Class: Melbourne::AST::BackRef

Inherits:
Node
  • Object
show all
Defined in:
lib/melbourne/ast/variables.rb

Overview

A back reference as in:

$&

or

$'

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, ref) ⇒ BackRef

Returns a new instance of BackRef.



19
20
21
22
# File 'lib/melbourne/ast/variables.rb', line 19

def initialize(line, ref)
  @line = line
  @kind = ref
end

Instance Attribute Details

#kindObject

The kind of back reference



17
18
19
# File 'lib/melbourne/ast/variables.rb', line 17

def kind
  @kind
end