Class: TBMX::NumberToken
- Inherits:
-
Token
- Object
- ParserNode
- Token
- TBMX::NumberToken
- Defined in:
- lib/tbmx.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(text) ⇒ NumberToken
constructor
A new instance of NumberToken.
- #parse ⇒ Object
- #to_html ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(text) ⇒ NumberToken
Returns a new instance of NumberToken.
196 197 198 199 |
# File 'lib/tbmx.rb', line 196 def initialize(text) raise ArgumentError if not text.is_a? String @text = text end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
194 195 196 |
# File 'lib/tbmx.rb', line 194 def number @number end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
194 195 196 |
# File 'lib/tbmx.rb', line 194 def text @text end |
Class Method Details
.matches?(text) ⇒ Boolean
213 214 |
# File 'lib/tbmx.rb', line 213 def matches? text end |
Instance Method Details
#parse ⇒ Object
201 202 |
# File 'lib/tbmx.rb', line 201 def parse end |
#to_html ⇒ Object
208 209 210 |
# File 'lib/tbmx.rb', line 208 def to_html to_s end |
#to_s ⇒ Object
204 205 206 |
# File 'lib/tbmx.rb', line 204 def to_s number.to_s end |