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.
200 201 202 203 |
# File 'lib/tbmx.rb', line 200 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.
198 199 200 |
# File 'lib/tbmx.rb', line 198 def number @number end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
198 199 200 |
# File 'lib/tbmx.rb', line 198 def text @text end |
Class Method Details
.matches?(text) ⇒ Boolean
217 218 |
# File 'lib/tbmx.rb', line 217 def matches? text end |
Instance Method Details
#parse ⇒ Object
205 206 |
# File 'lib/tbmx.rb', line 205 def parse end |
#to_html ⇒ Object
212 213 214 |
# File 'lib/tbmx.rb', line 212 def to_html to_s end |
#to_s ⇒ Object
208 209 210 |
# File 'lib/tbmx.rb', line 208 def to_s number.to_s end |