Class: Temple::Mixins::GrammarDSL::Value Private

Inherits:
Rule show all
Defined in:
lib/temple/mixins/grammar_dsl.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Methods inherited from Rule

#copy_to, #match?, #|

Constructor Details

#initialize(grammar, value) ⇒ Value

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Value.



106
107
108
109
# File 'lib/temple/mixins/grammar_dsl.rb', line 106

def initialize(grammar, value)
  super(grammar)
  @value = value
end

Instance Method Details

#match(exp, unmatched) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



111
112
113
# File 'lib/temple/mixins/grammar_dsl.rb', line 111

def match(exp, unmatched)
  @value === exp
end