Class: Achoo::Plugin::Awake

Inherits:
Plugman::PluginBase
  • Object
show all
Includes:
UI::ExceptionHandling
Defined in:
lib/achoo/plugin/awake.rb

Instance Method Summary collapse

Methods included from UI::ExceptionHandling

#get_exception_reason, #handle_exception, #handle_fatal_exception

Instance Method Details

#before_register_hour_hours(date) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/achoo/plugin/awake.rb', line 10

def before_register_hour_hours(date)
  puts "Awake log:"
  begin
    awake = Achoo::Awake.new
    awake.at(date)
    puts
  rescue Exception => e
    print handle_exception("Failed to retrieve awake log.", e)
  end
end