Class: Sass::Script::Tree::Literal
- Inherits:
- Node
- Object
- Node
- Sass::Script::Tree::Literal
show all - Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb
Overview
The parse tree node for a literal scalar value. This wraps an instance of Value::Base.
List literals should use ListLiteral instead.
Instance Attribute Summary (collapse)
Attributes inherited from Node
#css_variable_warning, #filename, #line, #options, #source_range
Instance Method Summary (collapse)
Methods inherited from Node
#dasherize, #opts, #perform
Constructor Details
- (Literal) initialize(value)
Creates a new literal value.
16
17
18 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb', line 16
def initialize(value)
@value = value
end |
Instance Attribute Details
10
11
12 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb', line 10
def value
@value
end |
Instance Method Details
44
45
46
47 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb', line 44
def _perform(environment)
value.source_range = source_range
value
end |
- children
21 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb', line 21
def children; []; end |
- deep_copy
27 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb', line 27
def deep_copy; dup; end |
- force_division!
38
39
40 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb', line 38
def force_division!
value.original = nil if value.is_a?(Sass::Script::Value::Number)
end |
- inspect
34
35
36 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb', line 34
def inspect
value.inspect
end |
- options=(options)
30
31
32 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb', line 30
def options=(options)
value.options = options
end |
- to_sass(opts = {})
24 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/script/tree/literal.rb', line 24
def to_sass(opts = {}); value.to_sass(opts); end |