Class: Sass::Tree::ForNode
Overview
A dynamic node representing a Sass @for
loop.
Instance Attribute Summary collapse
-
#exclusive ⇒ Boolean
readonly
Whether to include
to
in the loop or stop just before. -
#from ⇒ Script::Tree::Node
The parse tree for the initial expression.
-
#to ⇒ Script::Tree::Node
The parse tree for the final expression.
-
#var ⇒ String
readonly
The name of the loop variable.
Attributes inherited from Node
#children, #filename, #has_children, #line, #options, #source_range
Instance Method Summary collapse
-
#initialize(var, from, to, exclusive) ⇒ ForNode
constructor
A new instance of ForNode.
Methods inherited from Node
#<<, #==, #balance, #bubbles?, #css, #css_with_sourcemap, #deep_copy, #each, #inspect, #invisible?, #style, #to_sass, #to_scss
Constructor Details
#initialize(var, from, to, exclusive) ⇒ ForNode
Returns a new instance of ForNode.
28 29 30 31 32 33 34 |
# File 'lib/sass/tree/for_node.rb', line 28
def initialize(var, from, to, exclusive)
@var = var
@from = from
@to = to
@exclusive = exclusive
super()
end
|
Instance Attribute Details
#exclusive ⇒ Boolean (readonly)
Whether to include to
in the loop or stop just before.
22 23 24 |
# File 'lib/sass/tree/for_node.rb', line 22
def exclusive
@exclusive
end
|
#from ⇒ Script::Tree::Node
The parse tree for the initial expression.
14 15 16 |
# File 'lib/sass/tree/for_node.rb', line 14
def from
@from
end
|
#to ⇒ Script::Tree::Node
The parse tree for the final expression.
18 19 20 |
# File 'lib/sass/tree/for_node.rb', line 18
def to
@to
end
|
#var ⇒ String (readonly)
The name of the loop variable.
10 11 12 |
# File 'lib/sass/tree/for_node.rb', line 10
def var
@var
end
|