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 Node#children
# File lib/sass/script/tree/literal.rb, line 21 def children; []; end
deep_copy()
click to toggle source
@see Node#deep_copy
# File lib/sass/script/tree/literal.rb, line 27 def deep_copy; dup; end
force_division!()
click to toggle source
# File lib/sass/script/tree/literal.rb, line 38 def force_division! value.original = nil if value.is_a?(Sass::Script::Value::Number) 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 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 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 44 def _perform(environment) value.source_range = source_range value end