Class: TimePatterns::TimeEndingToken
- Inherits:
-
Object
- Object
- TimePatterns::TimeEndingToken
- Defined in:
- lib/todo_time_patterns/tokens.rb
Instance Attribute Summary collapse
-
#end_index ⇒ Object
readonly
Returns the value of attribute end_index.
-
#hours ⇒ Object
readonly
Returns the value of attribute hours.
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#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) ⇒ TimeEndingToken
constructor
A new instance of TimeEndingToken.
- #to_s ⇒ Object
Constructor Details
#initialize(values) ⇒ TimeEndingToken
Returns a new instance of TimeEndingToken.
169 170 171 172 173 174 175 176 |
# File 'lib/todo_time_patterns/tokens.rb', line 169 def initialize(values) @interval = 0 @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.
164 165 166 |
# File 'lib/todo_time_patterns/tokens.rb', line 164 def end_index @end_index end |
#hours ⇒ Object (readonly)
Returns the value of attribute hours.
165 166 167 |
# File 'lib/todo_time_patterns/tokens.rb', line 165 def hours @hours end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
167 168 169 |
# File 'lib/todo_time_patterns/tokens.rb', line 167 def interval @interval end |
#minutes ⇒ Object (readonly)
Returns the value of attribute minutes.
166 167 168 |
# File 'lib/todo_time_patterns/tokens.rb', line 166 def minutes @minutes end |
#start_index ⇒ Object (readonly)
Returns the value of attribute start_index.
163 164 165 |
# File 'lib/todo_time_patterns/tokens.rb', line 163 def start_index @start_index end |
Instance Method Details
#to_s ⇒ Object
178 179 180 |
# File 'lib/todo_time_patterns/tokens.rb', line 178 def to_s "{ending_form}" end |