Class: LibRubyParser::Nodes::InPattern

Inherits:
LibRubyParser::Node show all
Defined in:
lib/lib-ruby-parser/nodes.rb

Overview

Represents an in pattern branch of the pattern matching

Instance Attribute Summary collapse

Instance Attribute Details

#begin_lLoc (readonly)

Location of the then keyword

case value; in pattern then; end
                       ~~~~

Returns:



2122
2123
2124
# File 'lib/lib-ruby-parser/nodes.rb', line 2122

def begin_l
  @begin_l
end

#bodyNode? (readonly)

Body of the branch that is invoked if value matches pattern

Returns:



2104
2105
2106
# File 'lib/lib-ruby-parser/nodes.rb', line 2104

def body
  @body
end

#expression_lLoc (readonly)

Location of the full expression

case value; in pattern then; 42; end
            ~~~~~~~~~~~~~~~~~~~

Returns:



2131
2132
2133
# File 'lib/lib-ruby-parser/nodes.rb', line 2131

def expression_l
  @expression_l
end

#guardNode? (readonly)

Guard that is used for matching

Optional, so can be None

Returns:



2100
2101
2102
# File 'lib/lib-ruby-parser/nodes.rb', line 2100

def guard
  @guard
end

#keyword_lLoc (readonly)

Location of the in keyword

case value; in pattern; end
            ~~

Returns:



2113
2114
2115
# File 'lib/lib-ruby-parser/nodes.rb', line 2113

def keyword_l
  @keyword_l
end

#patternNode (readonly)

Value that is used for matching

Returns:



2094
2095
2096
# File 'lib/lib-ruby-parser/nodes.rb', line 2094

def pattern
  @pattern
end