module Ketchup::Exception
Public Class Methods
environment()
click to toggle source
# File lib/exception-ketchup.rb, line 45 def self.environment if @@environment.is_a?(Symbol) or @@environment.is_a?(String) return [@@environment] else return @@environment end end
recipients()
click to toggle source
A comma seperated list or an array of email addresses to which the exception notification should be mailed.
# File lib/exception-ketchup.rb, line 62 def self.recipients if @@deliver_mail raise "[Ketchup] You have to provide at least one recipient!" if @@recipients.empty? end return @@recipients.join(",") if @@recipients.respond_to?(:join) return @@recipients end
sender()
click to toggle source
# File lib/exception-ketchup.rb, line 75 def self.sender if @@deliver_mail STDOUT.write "[Ketchup] You have to provide a sender email." if @@sender.empty? end #return "hulla@hui.com" return @@sender end
sender=(sender)
click to toggle source
The senders address. Required for configuration
# File lib/exception-ketchup.rb, line 71 def self.sender=(sender) @@sender = sender end
setup() { |self| ... }
click to toggle source
Setup ketchup. The config file should be in config/initializers.
# File lib/exception-ketchup.rb, line 23 def self.setup(&block) yield(self) end