Struct.new(:sender_address, :exception_recipients, :email_prefix, :email_format, :sections, :background_sections, :verbose_subject, :normalize_subject, :delivery_method, :mailer_settings, :email_headers, :mailer_parent, :template_path)
# File lib/exception_notifier/email_notifier.rb, line 159 def self.default_options { :sender_address => %("Exception Notifier" <exception.notifier@example.com>), :exception_recipients => [], :email_prefix => "[ERROR] ", :email_format => :text, :sections => %(request session environment backtrace), :background_sections => %(backtrace data), :verbose_subject => true, :normalize_subject => false, :delivery_method => nil, :mailer_settings => nil, :email_headers => {}, :mailer_parent => 'ActionMailer::Base', :template_path => 'exception_notifier' } end
# File lib/exception_notifier/email_notifier.rb, line 120 def initialize(options) delivery_method = (options[:delivery_method] || :smtp) mailer_settings_key = "#{delivery_method}_settings".to_sym options[:mailer_settings] = options.delete(mailer_settings_key) super(*options.reverse_merge(EmailNotifier.default_options).values_at( :sender_address, :exception_recipients, :email_prefix, :email_format, :sections, :background_sections, :verbose_subject, :normalize_subject, :delivery_method, :mailer_settings, :email_headers, :mailer_parent, :template_path)) end
# File lib/exception_notifier/email_notifier.rb, line 145 def call(exception, options={}) create_email(exception, options).deliver end
# File lib/exception_notifier/email_notifier.rb, line 149 def create_email(exception, options={}) env = options[:env] default_options = self.options if env.nil? mailer.background_exception_notification(exception, options, default_options) else mailer.exception_notification(env, exception, options, default_options) end end
Generated with the Darkfish Rdoc Generator 2.