Class: LibRubyParser::Nodes::MatchAs

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

Instance Attribute Details

#asNode (readonly)

Variable that is assigned if matched (see MatchVar node)

Returns:



2616
2617
2618
# File 'lib/lib-ruby-parser/nodes.rb', line 2616

def as
  @as
end

#expression_lLoc (readonly)

Location of the full expression

“‘text case 1; in Integer => a; end

~~~~~~~~~~~~

“‘

Returns:



2634
2635
2636
# File 'lib/lib-ruby-parser/nodes.rb', line 2634

def expression_l
  @expression_l
end

#operator_lLoc (readonly)

Location of the ‘=>` operator

“‘text case 1; in Integer => a; end

~~

“‘

Returns:



2625
2626
2627
# File 'lib/lib-ruby-parser/nodes.rb', line 2625

def operator_l
  @operator_l
end

#valueNode (readonly)

Pattern that is used for matching

Returns:



2612
2613
2614
# File 'lib/lib-ruby-parser/nodes.rb', line 2612

def value
  @value
end