Class: Melbourne::AST::BlockArgument

Inherits:
Node
  • Object
show all
Includes:
LocalVariable
Defined in:
lib/melbourne/ast/definitions.rb

Overview

A block argument as in:

def method(&block)
end

Instance Attribute Summary collapse

Attributes included from LocalVariable

#variable

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, name) ⇒ BlockArgument

Returns a new instance of BlockArgument.



286
287
288
289
# File 'lib/melbourne/ast/definitions.rb', line 286

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

Instance Attribute Details

#nameObject

The name of the block argument



284
285
286
# File 'lib/melbourne/ast/definitions.rb', line 284

def name
  @name
end