Class: LibRubyParser::Nodes::BlockPass
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::BlockPass
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents a &blk
argument of the method call (but not of the method definition, see BlockArg
)
Instance Attribute Summary collapse
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#operator_l ⇒ Loc
readonly
Location of the
&
operator. -
#value ⇒ Node?
readonly
Value that is converted to a block.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the full expression
foo(&bar)
~~~~
463 464 465 |
# File 'lib/lib-ruby-parser/nodes.rb', line 463 def expression_l @expression_l end |
#operator_l ⇒ Loc (readonly)
Location of the &
operator
foo(&blk)
~
454 455 456 |
# File 'lib/lib-ruby-parser/nodes.rb', line 454 def operator_l @operator_l end |
#value ⇒ Node? (readonly)
Value that is converted to a block
Int("1")
in foo(&1)
(yes, it's possible)
445 446 447 |
# File 'lib/lib-ruby-parser/nodes.rb', line 445 def value @value end |