Class: Melbourne::AST::Iter
Overview
A code block as in:
m { some }
Direct Known Subclasses
Instance Attribute Summary collapse
-
#arguments ⇒ Object
The arguments of the code block.
-
#body ⇒ Object
The body of the code block.
-
#parent ⇒ Object
The parent node of the code block.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, arguments, body) ⇒ Iter
constructor
A new instance of Iter.
Methods inherited from Node
Constructor Details
#initialize(line, arguments, body) ⇒ Iter
Returns a new instance of Iter.
234 235 236 237 238 |
# File 'lib/melbourne/ast/sends.rb', line 234 def initialize(line, arguments, body) @line = line @arguments = IterArguments.new line, arguments @body = body || Nil.new(line) end |
Instance Attribute Details
#arguments ⇒ Object
The arguments of the code block
228 229 230 |
# File 'lib/melbourne/ast/sends.rb', line 228 def arguments @arguments end |
#body ⇒ Object
The body of the code block
232 233 234 |
# File 'lib/melbourne/ast/sends.rb', line 232 def body @body end |
#parent ⇒ Object
The parent node of the code block
224 225 226 |
# File 'lib/melbourne/ast/sends.rb', line 224 def parent @parent end |