Class: LibRubyParser::Nodes::MatchPattern

Inherits:
LibRubyParser::Node show all
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

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

foo => pattern
~~~~~~~~~~~~~~

Returns:



2735
2736
2737
# File 'lib/lib-ruby-parser/nodes.rb', line 2735

def expression_l
  @expression_l
end

#operator_lLoc (readonly)

Location of the => operator

foo => pattern
    ~~

Returns:



2726
2727
2728
# File 'lib/lib-ruby-parser/nodes.rb', line 2726

def operator_l
  @operator_l
end

#patternNode (readonly)

Pattern that is used for matching

Returns:



2717
2718
2719
# File 'lib/lib-ruby-parser/nodes.rb', line 2717

def pattern
  @pattern
end

#valueNode (readonly)

Value that is used for matching

Returns:



2713
2714
2715
# File 'lib/lib-ruby-parser/nodes.rb', line 2713

def value
  @value
end