Class: LibRubyParser::Nodes::Restarg

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

Overview

Represents positional rest argument (i.e. ‘*foo` in `def m(*foo); end`)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

“‘text def m(*foo); end

~~~~

“‘

Returns:



3624
3625
3626
# File 'lib/lib-ruby-parser/nodes.rb', line 3624

def expression_l
  @expression_l
end

#nameString? (readonly)

Name of the argument.

None if argument has no name (i.e. ‘def m(*); end`)

Returns:

  • (String, nil)


3597
3598
3599
# File 'lib/lib-ruby-parser/nodes.rb', line 3597

def name
  @name
end

#name_lLoc? (readonly)

Location of the argument name

“‘text def m(*foo); end

~~~

“‘

Returns:



3615
3616
3617
# File 'lib/lib-ruby-parser/nodes.rb', line 3615

def name_l
  @name_l
end

#operator_lLoc (readonly)

Location of the ‘*` operator

“‘text def m(*foo); end

~

“‘

Returns:



3606
3607
3608
# File 'lib/lib-ruby-parser/nodes.rb', line 3606

def operator_l
  @operator_l
end