Class: Melbourne::AST::NthRef
- Defined in:
- lib/melbourne/ast/variables.rb
Overview
A reference to the nth match in a regular expression match result as in:
$1
Instance Attribute Summary collapse
-
#which ⇒ Object
The number of the match that is referenced.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, ref) ⇒ NthRef
constructor
A new instance of NthRef.
Methods inherited from Node
Constructor Details
#initialize(line, ref) ⇒ NthRef
36 37 38 39 |
# File 'lib/melbourne/ast/variables.rb', line 36 def initialize(line, ref) @line = line @which = ref end |
Instance Attribute Details
#which ⇒ Object
The number of the match that is referenced
34 35 36 |
# File 'lib/melbourne/ast/variables.rb', line 34 def which @which end |