Class: LibRubyParser::Nodes::BlockPass

Inherits:
LibRubyParser::Node show all
Defined in:
lib/lib-ruby-parser/nodes.rb

Overview

Represents a &blk argument of the method call (but not of the method definition, see BlockArg)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

foo(&bar)
    ~~~~

Returns:



463
464
465
# File 'lib/lib-ruby-parser/nodes.rb', line 463

def expression_l
  @expression_l
end

#operator_lLoc (readonly)

Location of the & operator

foo(&blk)
    ~

Returns:



454
455
456
# File 'lib/lib-ruby-parser/nodes.rb', line 454

def operator_l
  @operator_l
end

#valueNode? (readonly)

Value that is converted to a block

Int("1") in foo(&1) (yes, it's possible)

Returns:



445
446
447
# File 'lib/lib-ruby-parser/nodes.rb', line 445

def value
  @value
end