Class: LibRubyParser::Nodes::Blockarg

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

Overview

Represents a &blk argument in the method definition (but not in the method call, see BlockPass)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

def m(&foo); end
      ~~~~

Returns:



435
436
437
# File 'lib/lib-ruby-parser/nodes.rb', line 435

def expression_l
  @expression_l
end

#nameString? (readonly)

Name of the argument, String("foo") for def m(&foo)

Returns:

  • (String, nil)


408
409
410
# File 'lib/lib-ruby-parser/nodes.rb', line 408

def name
  @name
end

#name_lLoc? (readonly)

Location of the name

def m(&foo); end
       ~~~

Returns:



426
427
428
# File 'lib/lib-ruby-parser/nodes.rb', line 426

def name_l
  @name_l
end

#operator_lLoc (readonly)

Location of the & operator

def m(&foo); end
      ~

Returns:



417
418
419
# File 'lib/lib-ruby-parser/nodes.rb', line 417

def operator_l
  @operator_l
end