Class: TBMX::Token
- Inherits:
-
ParserNode
- Object
- ParserNode
- TBMX::Token
- Defined in:
- lib/tbmx.rb
Direct Known Subclasses
Class Method Summary collapse
-
.matches?(text) ⇒ Boolean
The child classes should implement this method.
Class Method Details
.matches?(text) ⇒ Boolean
The child classes should implement this method. If there is an immediate match, they should return a newly-created instance of themselves and the rest of the input as a string. If there is no match, they should return nil.
74 75 76 77 |
# File 'lib/tbmx.rb', line 74 def matches? text raise NotImplementedError, "Child class #{self.class} should implement this." end |