Module: ZombieFans::Actions::Logger

Included in:
Robot
Defined in:
lib/zombie_fans/actions/logger.rb

Instance Method Summary collapse

Instance Method Details

#debug_page(page) ⇒ Object



13
14
15
# File 'lib/zombie_fans/actions/logger.rb', line 13

def debug_page page
  File.write("debug.html", page.body)
end

#log_action(action, message) ⇒ Object



5
6
7
# File 'lib/zombie_fans/actions/logger.rb', line 5

def log_action action, message
  puts "#{action.colorize(:green)} #{message}"
end

#log_error(message) ⇒ Object



9
10
11
# File 'lib/zombie_fans/actions/logger.rb', line 9

def log_error message
  puts "#{"Error occurred:".colorize(:red)} #{message}"
end