Class: LibRubyParser::Nodes::MatchPattern
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::MatchPattern
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents a one-line pattern matching that can throw an error (i.e. foo => pattern
)
Instance Attribute Summary collapse
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#operator_l ⇒ Loc
readonly
Location of the
=>
operator. -
#pattern ⇒ Node
readonly
Pattern that is used for matching.
-
#value ⇒ Node
readonly
Value that is used for matching.
Instance Attribute Details
#expression_l ⇒ Loc (readonly)
Location of the full expression
foo => pattern
~~~~~~~~~~~~~~
2735 2736 2737 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2735 def expression_l @expression_l end |
#operator_l ⇒ Loc (readonly)
Location of the =>
operator
foo => pattern
~~
2726 2727 2728 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2726 def operator_l @operator_l end |
#pattern ⇒ Node (readonly)
Pattern that is used for matching
2717 2718 2719 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2717 def pattern @pattern end |
#value ⇒ Node (readonly)
Value that is used for matching
2713 2714 2715 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2713 def value @value end |