Class: Timing::NaturalTimeLanguage::SecondInterval
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Timing::NaturalTimeLanguage::SecondInterval
- Defined in:
- lib/timing/natural_time_language_interpreters.rb
Instance Method Summary collapse
- #beginning_of(time) ⇒ Object
- #end_of(time) ⇒ Object
- #time_after(time, number) ⇒ Object
- #time_ago(time, number) ⇒ Object
Instance Method Details
#beginning_of(time) ⇒ Object
181 182 183 |
# File 'lib/timing/natural_time_language_interpreters.rb', line 181 def beginning_of(time) raise 'Not supported' end |
#end_of(time) ⇒ Object
185 186 187 |
# File 'lib/timing/natural_time_language_interpreters.rb', line 185 def end_of(time) raise 'Not supported' end |
#time_after(time, number) ⇒ Object
177 178 179 |
# File 'lib/timing/natural_time_language_interpreters.rb', line 177 def time_after(time, number) time + Interval.seconds(number) end |
#time_ago(time, number) ⇒ Object
173 174 175 |
# File 'lib/timing/natural_time_language_interpreters.rb', line 173 def time_ago(time, number) time - Interval.seconds(number) end |