Class: LibRubyParser::Nodes::InPattern
- Inherits:
-
LibRubyParser::Node
- Object
- LibRubyParser::Node
- LibRubyParser::Nodes::InPattern
- Defined in:
- lib/lib-ruby-parser/nodes.rb
Overview
Represents an in pattern
branch of the pattern matching
Instance Attribute Summary collapse
-
#begin_l ⇒ Loc
readonly
Location of the
then
keyword. -
#body ⇒ Node?
readonly
Body of the branch that is invoked if value matches pattern.
-
#expression_l ⇒ Loc
readonly
Location of the full expression.
-
#guard ⇒ Node?
readonly
Guard that is used for matching.
-
#keyword_l ⇒ Loc
readonly
Location of the
in
keyword. -
#pattern ⇒ Node
readonly
Value that is used for matching.
Instance Attribute Details
#begin_l ⇒ Loc (readonly)
Location of the then
keyword
case value; in pattern then; end
~~~~
2122 2123 2124 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2122 def begin_l @begin_l end |
#body ⇒ Node? (readonly)
Body of the branch that is invoked if value matches pattern
2104 2105 2106 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2104 def body @body end |
#expression_l ⇒ Loc (readonly)
Location of the full expression
case value; in pattern then; 42; end
~~~~~~~~~~~~~~~~~~~
2131 2132 2133 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2131 def expression_l @expression_l end |
#guard ⇒ Node? (readonly)
Guard that is used for matching
Optional, so can be None
2100 2101 2102 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2100 def guard @guard end |
#keyword_l ⇒ Loc (readonly)
Location of the in
keyword
case value; in pattern; end
~~
2113 2114 2115 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2113 def keyword_l @keyword_l end |
#pattern ⇒ Node (readonly)
Value that is used for matching
2094 2095 2096 |
# File 'lib/lib-ruby-parser/nodes.rb', line 2094 def pattern @pattern end |