Class: Melbourne::AST::BlockPass

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

Overview

A block that is passed as a parameter as in:

method(&b)

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, body) ⇒ BlockPass

Returns a new instance of BlockPass.



153
154
155
156
# File 'lib/melbourne/ast/sends.rb', line 153

def initialize(line, body)
  @line = line
  @body = body
end

Instance Attribute Details

#bodyObject

The actual block that is passed



151
152
153
# File 'lib/melbourne/ast/sends.rb', line 151

def body
  @body
end