Class: Melbourne::AST::Iter

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

Overview

A code block as in:

m { some }

Direct Known Subclasses

For

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

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

#argumentsObject

The arguments of the code block



228
229
230
# File 'lib/melbourne/ast/sends.rb', line 228

def arguments
  @arguments
end

#bodyObject

The body of the code block



232
233
234
# File 'lib/melbourne/ast/sends.rb', line 232

def body
  @body
end

#parentObject

The parent node of the code block



224
225
226
# File 'lib/melbourne/ast/sends.rb', line 224

def parent
  @parent
end