Class: Refract::ForNode
Instance Attribute Summary collapse
-
#collection ⇒ Object
Returns the value of attribute collection.
-
#index ⇒ Object
Returns the value of attribute index.
-
#statements ⇒ Object
Returns the value of attribute statements.
Instance Method Summary collapse
-
#initialize(prism_node: nil, index:, collection:, statements:) ⇒ ForNode
constructor
A new instance of ForNode.
Methods inherited from Node
#accept, #copy, #start_line, #type, type
Constructor Details
#initialize(prism_node: nil, index:, collection:, statements:) ⇒ ForNode
Returns a new instance of ForNode.
5 6 7 8 9 10 11 |
# File 'lib/refract/nodes/for_node.rb', line 5 def initialize(prism_node: nil, index:, collection:, statements:) @prism_node = prism_node => Prism::Node | nil @index = index @collection = collection @statements = statements freeze end |
Instance Attribute Details
#collection ⇒ Object
Returns the value of attribute collection.
13 14 15 |
# File 'lib/refract/nodes/for_node.rb', line 13 def collection @collection end |
#index ⇒ Object
Returns the value of attribute index.
13 14 15 |
# File 'lib/refract/nodes/for_node.rb', line 13 def index @index end |
#statements ⇒ Object
Returns the value of attribute statements.
13 14 15 |
# File 'lib/refract/nodes/for_node.rb', line 13 def statements @statements end |