Class: LibRubyParser::Nodes::MatchAs
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::MatchAs
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents matching with renaming into specified local variable (i.e. case 1; in Integer => a; end
)
Instance Attribute Summary collapse
-
#as ⇒ Node
readonly
Variable that is assigned if matched (see
MatchVar
node). -
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#operator_l ⇒ Loc
readonly
Location of the
=>
operator. -
#value ⇒ Node
readonly
Pattern that is used for matching.
Instance Attribute Details
#as ⇒ Node (readonly)
Variable that is assigned if matched (see MatchVar
node)
2616 2617 2618 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2616 def as @as end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
case 1; in Integer => a; end
~~~~~~~~~~~~
2634 2635 2636 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2634 def expression_l @expression_l end |
#operator_l ⇒ Loc (readonly)
Location of the =>
operator
case 1; in Integer => a; end
~~
2625 2626 2627 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2625 def operator_l @operator_l end |
#value ⇒ Node (readonly)
Pattern that is used for matching
2612 2613 2614 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2612 def value @value end |