Class: Sass::Tree::ForNode

Inherits:
Node
  • Object
show all
Defined in:
lib/sass/tree/for_node.rb

Overview

A dynamic node representing a Sass @for loop.

See Also:

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #filename, #has_children, #line, #options

Instance Method Summary collapse

Methods inherited from Node

#<<, #==, #balance, #deep_copy, #do_extend, #each, #invisible?, #style, #to_s, #to_sass, #to_scss

Constructor Details

#initialize(var, from, to, exclusive) ⇒ ForNode

Returns a new instance of ForNode.

Parameters:



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

#exclusiveBoolean (readonly)

Whether to include to in the loop or stop just before.

Returns:

  • (Boolean)


22
23
24
# File 'lib/sass/tree/for_node.rb', line 22

def exclusive
  @exclusive
end

#fromScript::Node

The parse tree for the initial expression.

Returns:



14
15
16
# File 'lib/sass/tree/for_node.rb', line 14

def from
  @from
end

#toScript::Node

The parse tree for the final expression.

Returns:



18
19
20
# File 'lib/sass/tree/for_node.rb', line 18

def to
  @to
end

#varString (readonly)

The name of the loop variable.

Returns:

  • (String)


10
11
12
# File 'lib/sass/tree/for_node.rb', line 10

def var
  @var
end