Class: TimePatterns::IntervalToken
- Inherits:
-
Object
- Object
- TimePatterns::IntervalToken
- Defined in:
- lib/todo_time_patterns/tokens.rb
Instance Attribute Summary collapse
-
#end_index ⇒ Object
readonly
Returns the value of attribute end_index.
-
#minutes ⇒ Object
readonly
Returns the value of attribute minutes.
-
#start_index ⇒ Object
readonly
Returns the value of attribute start_index.
Instance Method Summary collapse
-
#initialize(values) ⇒ IntervalToken
constructor
A new instance of IntervalToken.
- #to_s ⇒ Object
Constructor Details
#initialize(values) ⇒ IntervalToken
Returns a new instance of IntervalToken.
123 124 125 126 127 128 129 |
# File 'lib/todo_time_patterns/tokens.rb', line 123 def initialize(values) @values = values @values.extend(TokensStringRepresentation) set_start_and_end_indexes values set_minutes values end |
Instance Attribute Details
#end_index ⇒ Object (readonly)
Returns the value of attribute end_index.
120 121 122 |
# File 'lib/todo_time_patterns/tokens.rb', line 120 def end_index @end_index end |
#minutes ⇒ Object (readonly)
Returns the value of attribute minutes.
121 122 123 |
# File 'lib/todo_time_patterns/tokens.rb', line 121 def minutes @minutes end |
#start_index ⇒ Object (readonly)
Returns the value of attribute start_index.
119 120 121 |
# File 'lib/todo_time_patterns/tokens.rb', line 119 def start_index @start_index end |
Instance Method Details
#to_s ⇒ Object
131 132 133 |
# File 'lib/todo_time_patterns/tokens.rb', line 131 def to_s "{interval}" end |