Class: Sass::Script::Tree::Literal
- Inherits:
-
Node
- Object
- Node
- Sass::Script::Tree::Literal
show all
- Defined in:
- .ruby-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
#filename, #line, #options, #source_range
Instance Method Summary
(collapse)
Methods inherited from Node
#perform
Constructor Details
#initialize(value) ⇒ Literal
Creates a new literal value.
16
17
18
|
# File '.ruby-sass/lib/sass/script/tree/literal.rb', line 16
def initialize(value)
@value = value
end
|
Constructor Details
#initialize(value) ⇒ Literal
Creates a new literal value.
16
17
18
|
# File '.ruby-sass/lib/sass/script/tree/literal.rb', line 16
def initialize(value)
@value = value
end
|
Instance Attribute Details
10
11
12
|
# File '.ruby-sass/lib/sass/script/tree/literal.rb', line 10
def value
@value
end
|
Instance Method Details
#children ⇒ Object
21
|
# File '.ruby-sass/lib/sass/script/tree/literal.rb', line 21
def children; []; end
|
#deep_copy ⇒ Object
27
|
# File '.ruby-sass/lib/sass/script/tree/literal.rb', line 27
def deep_copy; dup; end
|
#force_division! ⇒ Object
38
39
40
|
# File '.ruby-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 ⇒ Object
34
35
36
|
# File '.ruby-sass/lib/sass/script/tree/literal.rb', line 34
def inspect
value.inspect
end
|
#options=(options) ⇒ Object
30
31
32
|
# File '.ruby-sass/lib/sass/script/tree/literal.rb', line 30
def options=(options)
value.options = options
end
|
#to_sass(opts = {}) ⇒ Object
24
|
# File '.ruby-sass/lib/sass/script/tree/literal.rb', line 24
def to_sass(opts = {}); value.to_sass(opts); end
|