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.
184 185 186 187 |
# File 'lib/tbmx.rb', line 184 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.
182 183 184 |
# File 'lib/tbmx.rb', line 182 def number @number end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
182 183 184 |
# File 'lib/tbmx.rb', line 182 def text @text end |
Class Method Details
.matches?(text) ⇒ Boolean
201 202 |
# File 'lib/tbmx.rb', line 201 def matches? text end |
Instance Method Details
#parse ⇒ Object
189 190 |
# File 'lib/tbmx.rb', line 189 def parse end |
#to_html ⇒ Object
196 197 198 |
# File 'lib/tbmx.rb', line 196 def to_html to_s end |
#to_s ⇒ Object
192 193 194 |
# File 'lib/tbmx.rb', line 192 def to_s number.to_s end |