Class: LibRubyParser::Nodes::Kwrestarg

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

Overview

Represents a keyword 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:



2424
2425
2426
# File 'lib/lib-ruby-parser/nodes.rb', line 2424

def expression_l
  @expression_l
end

#nameString? (readonly)

Name of the keyword rest argument, ‘String(“foo”)` in `def m(**foo); end`.

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

Returns:

  • (String, nil)


2395
2396
2397
# File 'lib/lib-ruby-parser/nodes.rb', line 2395

def name
  @name
end

#name_lLoc? (readonly)

Location of the argument name

“‘text def m(**foo); end

~~~

“‘

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

Returns:



2415
2416
2417
# File 'lib/lib-ruby-parser/nodes.rb', line 2415

def name_l
  @name_l
end

#operator_lLoc (readonly)

Location of the ‘**` operator

“‘text def m(**foo); end

~~

“‘

Returns:



2404
2405
2406
# File 'lib/lib-ruby-parser/nodes.rb', line 2404

def operator_l
  @operator_l
end