Class: Timing::NaturalTimeLanguage::HourMinuteSecond

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

Instance Method Summary collapse

Instance Method Details

#valueObject



321
322
323
324
325
326
327
328
329
# File 'lib/timing/natural_time_language_interpreters.rb', line 321

def value
  if text_value.downcase == 'beginning'
    '00:00:00'
  elsif text_value.downcase == 'end'
    '23:59:59'
  else
    "#{text_value}:00"[0..7]
  end
end