Class: TimePatterns::NumberToken
- Inherits:
-
Object
- Object
- TimePatterns::NumberToken
- Defined in:
- lib/todo_time_patterns/tokens.rb
Instance Attribute Summary collapse
-
#start_index ⇒ Object
readonly
Returns the value of attribute start_index.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, start_index) ⇒ NumberToken
constructor
A new instance of NumberToken.
- #to_s ⇒ Object
Constructor Details
#initialize(value, start_index) ⇒ NumberToken
Returns a new instance of NumberToken.
22 23 24 25 |
# File 'lib/todo_time_patterns/tokens.rb', line 22 def initialize(value, start_index) @value = Integer(value) @start_index = start_index end |
Instance Attribute Details
#start_index ⇒ Object (readonly)
Returns the value of attribute start_index.
20 21 22 |
# File 'lib/todo_time_patterns/tokens.rb', line 20 def start_index @start_index end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
19 20 21 |
# File 'lib/todo_time_patterns/tokens.rb', line 19 def value @value end |
Instance Method Details
#to_s ⇒ Object
27 28 29 |
# File 'lib/todo_time_patterns/tokens.rb', line 27 def to_s "{number}" end |