Class: Timing::NaturalTimeLanguage::BeforeFromMoment
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Timing::NaturalTimeLanguage::BeforeFromMoment
- Defined in:
- lib/timing/natural_time_language_interpreters.rb
Instance Method Summary collapse
Instance Method Details
#evaluate(zone_offset) ⇒ Object
125 126 127 128 129 130 131 132 |
# File 'lib/timing/natural_time_language_interpreters.rb', line 125 def evaluate(zone_offset) time = moment.evaluate zone_offset if direction.before? interval_type.time_ago time, number.value else interval_type.time_after time, number.value end end |