Class: LibRubyParser::Nodes::Args

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

Overview

Represents an arguments list

Args(vec![Arg("a"), Optarg("b", Int("1"))]) in def m(a, b = 1); end

Instance Attribute Summary collapse

Instance Attribute Details

#args::Array<Node> (readonly)

List of arguments

Returns:



135
136
137
# File 'lib/lib-ruby-parser/nodes.rb', line 135

def args
  @args
end

#begin_lLoc? (readonly)

Location of the open parenthesis

def m(a, b = 1, c:, &blk); end
     ~

None for code like def m; end or def m arg; end

Returns:



155
156
157
# File 'lib/lib-ruby-parser/nodes.rb', line 155

def begin_l
  @begin_l
end

#end_lLoc? (readonly)

Location of the closing parenthesis

def m(a, b = 1, c:, &blk); end
                        ~

None for code like def m; end or def m arg; end

Returns:



166
167
168
# File 'lib/lib-ruby-parser/nodes.rb', line 166

def end_l
  @end_l
end

#expression_lLoc (readonly)

Location of the full expression

def m(a, b = 1, c:, &blk); end
     ~~~~~~~~~~~~~~~~~~~~

Returns:



144
145
146
# File 'lib/lib-ruby-parser/nodes.rb', line 144

def expression_l
  @expression_l
end