Class: TimePatterns::WordToken
- Inherits:
-
Object
- Object
- TimePatterns::WordToken
- 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) ⇒ WordToken
constructor
A new instance of WordToken.
- #to_s ⇒ Object
Constructor Details
#initialize(value, start_index) ⇒ WordToken
Returns a new instance of WordToken.
8 9 10 11 |
# File 'lib/todo_time_patterns/tokens.rb', line 8 def initialize(value, start_index) @value = value @start_index = start_index end |
Instance Attribute Details
#start_index ⇒ Object (readonly)
Returns the value of attribute start_index.
6 7 8 |
# File 'lib/todo_time_patterns/tokens.rb', line 6 def start_index @start_index end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
5 6 7 |
# File 'lib/todo_time_patterns/tokens.rb', line 5 def value @value end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/todo_time_patterns/tokens.rb', line 13 def to_s "{word}" end |