Class: LibRubyParser::Nodes::Send
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::Send
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents a method call (e.g. foo.bar(42)
)
Instance Attribute Summary collapse
-
#args ⇒ ::Array<Node>
readonly
A list of arguments.
-
#begin_l ⇒ Loc?
readonly
Location of open parenthesis.
-
#dot_l ⇒ Loc?
readonly
Location of the
.
operator. -
#end_l ⇒ Loc?
readonly
Location of closing parenthesis.
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#method_name ⇒ String
readonly
Name of the method that is called.
-
#operator_l ⇒ Loc?
readonly
Location of the operator if method is a setter.
-
#recv ⇒ Node?
readonly
Receiver of the method call.
-
#selector_l ⇒ Loc?
readonly
Location of the method name.
Instance Attribute Details
#args ⇒ ::Array<Node> (readonly)
A list of arguments
3744 3745 3746 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3744 def args @args end |
#begin_l ⇒ Loc? (readonly)
Location of open parenthesis
foo(42)
~
None
if there are no parentheses
3777 3778 3779 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3777 def begin_l @begin_l end |
#dot_l ⇒ Loc? (readonly)
Location of the .
operator
foo.bar(42)
~
None
for implicit method call (e.g. foo(42)
)
3755 3756 3757 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3755 def dot_l @dot_l end |
#end_l ⇒ Loc? (readonly)
Location of closing parenthesis
foo(42)
~
None
if there are no parentheses
3788 3789 3790 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3788 def end_l @end_l end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
foo.bar(42)
~~~~~~~~~~~
3808 3809 3810 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3808 def expression_l @expression_l end |
#method_name ⇒ String (readonly)
Name of the method that is called
3740 3741 3742 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3740 def method_name @method_name end |
#operator_l ⇒ Loc? (readonly)
Location of the operator if method is a setter
foo.bar = 42
~
None
otherwise
3799 3800 3801 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3799 def operator_l @operator_l end |
#recv ⇒ Node? (readonly)
Receiver of the method call
None
for implicit method call (e.g. foo(42)
)
3736 3737 3738 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3736 def recv @recv end |
#selector_l ⇒ Loc? (readonly)
Location of the method name
foo.bar(42)
~~~
None
in a very special case when method call is implicit (i.e. foo.(42)
)
3766 3767 3768 |
# File 'lib/lib-ruby-parser/nodes.rb', line 3766 def selector_l @selector_l end |