Class: Natsuzora::AST::EachBlock

Inherits:
Node
  • Object
show all
Defined in:
lib/natsuzora/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#column, #line

Instance Method Summary collapse

Constructor Details

#initialize(collection:, item_name:, body_nodes:) ⇒ EachBlock

Returns a new instance of EachBlock.



67
68
69
70
71
72
# File 'lib/natsuzora/ast.rb', line 67

def initialize(collection:, item_name:, body_nodes:, **)
  super(**)
  @collection = collection
  @item_name = item_name
  @body_nodes = body_nodes
end

Instance Attribute Details

#body_nodesObject (readonly)

Returns the value of attribute body_nodes.



65
66
67
# File 'lib/natsuzora/ast.rb', line 65

def body_nodes
  @body_nodes
end

#collectionObject (readonly)

Returns the value of attribute collection.



65
66
67
# File 'lib/natsuzora/ast.rb', line 65

def collection
  @collection
end

#item_nameObject (readonly)

Returns the value of attribute item_name.



65
66
67
# File 'lib/natsuzora/ast.rb', line 65

def item_name
  @item_name
end