Class: Timing::NaturalTimeLanguage::TimeAgo

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/timing/natural_time_language_interpreters.rb

Instance Method Summary collapse

Instance Method Details

#evaluate(zone_offset) ⇒ Object



90
91
92
93
# File 'lib/timing/natural_time_language_interpreters.rb', line 90

def evaluate(zone_offset)
  now = TimeInZone.now zone_offset
  interval_type.time_ago now, number.value
end