Class: PEG::Reference

Inherits:
Rule show all
Defined in:
lib/peg.rb

Instance Attribute Summary collapse

Attributes inherited from Rule

#children

Instance Method Summary collapse

Methods inherited from Rule

#inspect, #name, #parse, #result

Methods inherited from ValueObject

#==

Constructor Details

#initialize(name) ⇒ Reference

Returns a new instance of Reference.



157
158
159
160
# File 'lib/peg.rb', line 157

def initialize(name)
  @reference = name
  @children = []
end

Instance Attribute Details

#referenceObject (readonly)

Returns the value of attribute reference.



155
156
157
# File 'lib/peg.rb', line 155

def reference
  @reference
end

Instance Method Details

#_inspectObject



162
163
164
# File 'lib/peg.rb', line 162

def _inspect
  @reference.inspect
end