Class: Ruboty::Actions::WorldClock

Inherits:
Base
  • Object
show all
Defined in:
lib/ruboty/actions/world_clock.rb

Instance Method Summary collapse

Instance Method Details

#callObject



4
5
6
7
8
9
10
# File 'lib/ruboty/actions/world_clock.rb', line 4

def call
  if timezone.present?
    message.reply(Time.now.in_time_zone(timezone).strftime('%Y-%m-%d %H:%M:%S'))
  else
    message.reply("Not found the timezone: \"#{message[:zone]}\".")
  end
end