class Sass::Script::Tree::Literal - sass-3.4.14 Documentation

# class Sass::Script::Tree::Literal

The parse tree node for a literal scalar value. This wraps an instance of {Sass::Script::Value::Base}.

List literals should use {ListLiteral} instead.

### Attributes

value[R]

The wrapped value.

@return [Sass::Script::Value::Base]

### Public Class Methods

new(value) click to toggle source

Creates a new literal value.

@param value [Sass::Script::Value::Base] @see value

    # File lib/sass/script/tree/literal.rb, line 16
    def initialize(value)
      @value = value
    end

### Public Instance Methods

children() click to toggle source

@see Sass::Script::Tree::Node#children

    # File lib/sass/script/tree/literal.rb, line 21
    def children; []; end

deep_copy() click to toggle source

@see Sass::Script::Tree::Node#deep_copy

    # File lib/sass/script/tree/literal.rb, line 27
    def deep_copy; dup; end

inspect() click to toggle source

    # File lib/sass/script/tree/literal.rb, line 34
    def inspect
      value.inspect
    end

options=(options) click to toggle source

@see Sass::Script::Tree::Node#options=

    # File lib/sass/script/tree/literal.rb, line 30
    def options=(options)
      value.options = options
    end

to_sass(opts = {}) click to toggle source

@see Sass::Script::Tree::Node#to_sass

    # File lib/sass/script/tree/literal.rb, line 24
    def to_sass(opts = {}); value.to_sass(opts); end

### Protected Instance Methods

_perform(environment) click to toggle source

    # File lib/sass/script/tree/literal.rb, line 40
    def _perform(environment)
      value.source_range = source_range
      value
    end