Class: Sass::Tree::ForNode

Inherits:
Node
  • Object
show all
Defined in:
/Users/ceppstei/Projects/sass-lang/.sass/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, #source_range

Instance Method Summary (collapse)

Methods inherited from Node

#<<, #==, #balance, #bubbles?, #css, #css_with_sourcemap, #deep_copy, #each, #inspect, #invisible?, #style, #to_sass, #to_scss

Constructor Details

- (ForNode) initialize(var, from, to, exclusive)

Returns a new instance of ForNode

Parameters:



28
29
30
31
32
33
34
# File '/Users/ceppstei/Projects/sass-lang/.sass/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

- (Boolean) exclusive (readonly)

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

Returns:

  • (Boolean)


22
23
24
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/for_node.rb', line 22

def exclusive
  @exclusive
end

- (Script::Tree::Node) from

The parse tree for the initial expression.

Returns:



14
15
16
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/for_node.rb', line 14

def from
  @from
end

- (Script::Tree::Node) to

The parse tree for the final expression.

Returns:



18
19
20
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/for_node.rb', line 18

def to
  @to
end

- (String) var (readonly)

The name of the loop variable.

Returns:

  • (String)


10
11
12
# File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/tree/for_node.rb', line 10

def var
  @var
end