Sha256: 9589626ac653f1c59d800641561de92690ead676bb9642da68b1239d1a15f558

Contents?: true

Size: 966 Bytes

Versions: 47

Compression:

Stored size: 966 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.line = line
      value.source_range = source_range
      value.filename = filename
      value
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
sass-3.3.0.rc.4 lib/sass/script/tree/literal.rb
sass-3.3.0.rc.3 lib/sass/script/tree/literal.rb
sass-3.3.0.rc.2 lib/sass/script/tree/literal.rb
sass-3.3.0.rc.1 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.392 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.391 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.390 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.389 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.388 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.382 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.380 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.378 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.377 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.376 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.375 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.372 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.370 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.369 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.368 lib/sass/script/tree/literal.rb
sass-3.3.0.alpha.367 lib/sass/script/tree/literal.rb