Class: TBMX::SingleCharacterToken
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.character_matched ⇒ Object
87
88
89
|
# File 'lib/tbmx.rb', line 87
def character_matched
self::CHARACTER_MATCHED
end
|
.matches?(text) ⇒ Boolean
91
92
93
94
95
96
97
|
# File 'lib/tbmx.rb', line 91
def matches? text
if text.first == character_matched
return [self.new, text.rest]
else
return nil
end
end
|
Instance Method Details
#text ⇒ Object
82
83
84
|
# File 'lib/tbmx.rb', line 82
def text
self.class.character_matched
end
|