Sha256: 260c756b989ecc6296839616dc20e4f55a5f7826e6e5110c17e5c8adb668956d

Contents?: true

Size: 910 Bytes

Versions: 46

Compression:

Stored size: 910 Bytes

Contents

module Sass::Script::Tree
  # The parse tree node for a literal scalar value. This wraps an instance of
  # {Sass::Script::Value::Base}.
  #
  # List literals should use {ListLiteral} instead.
  class Literal < Node
    # The wrapped value.
    #
    # @return [Sass::Script::Value::Base]
    attr_reader :value

    # Creates a new literal value.
    #
    # @param value [Sass::Script::Value::Base]
    # @see #value
    def initialize(value)
      @value = value
    end

    # @see Node#children
    def children; []; end

    # @see Node#to_sass
    def to_sass(opts = {}); value.to_sass(opts); end

    # @see Node#deep_copy
    def deep_copy; dup; end

    # @see Node#options=
    def options=(options)
      value.options = options
    end

    def inspect
      value.inspect
    end

    protected

    def _perform(environment)
      value.source_range = source_range
      value
    end
  end
end

Version data entries

46 entries across 45 versions & 3 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/sass-3.4.15/lib/sass/script/tree/literal.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/sass-3.4.15/lib/sass/script/tree/literal.rb
sass-3.4.16 lib/sass/script/tree/literal.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/sass-3.4.15/lib/sass/script/tree/literal.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/sass-3.4.14/lib/sass/script/tree/literal.rb
sass-3.4.15 lib/sass/script/tree/literal.rb
sass-3.4.14 lib/sass/script/tree/literal.rb
sass-3.4.13 lib/sass/script/tree/literal.rb
sass-3.4.12 lib/sass/script/tree/literal.rb
sass-3.4.11 lib/sass/script/tree/literal.rb
sass-3.4.10 lib/sass/script/tree/literal.rb
sass-3.4.9 lib/sass/script/tree/literal.rb
sass-3.4.8 lib/sass/script/tree/literal.rb
sass-3.4.7 lib/sass/script/tree/literal.rb
sass-3.4.6 lib/sass/script/tree/literal.rb
sass-3.4.5 lib/sass/script/tree/literal.rb
sass-3.4.4 lib/sass/script/tree/literal.rb
sass-3.4.3 lib/sass/script/tree/literal.rb
sass-3.4.2 lib/sass/script/tree/literal.rb
sass-3.4.1 lib/sass/script/tree/literal.rb