Module: ExceptionMailer

Defined in:
lib/exception_mailer.rb,
lib/exception_mailer/mailer.rb

Defined Under Namespace

Classes: Mailer

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.accountObject

Returns the value of attribute account.



5
6
7
# File 'lib/exception_mailer.rb', line 5

def 
  @account
end

.auth_methodObject

Returns the value of attribute auth_method.



5
6
7
# File 'lib/exception_mailer.rb', line 5

def auth_method
  @auth_method
end

.fromObject

Returns the value of attribute from.



5
6
7
# File 'lib/exception_mailer.rb', line 5

def from
  @from
end

.hostObject

Returns the value of attribute host.



5
6
7
# File 'lib/exception_mailer.rb', line 5

def host
  @host
end

.passwordObject

Returns the value of attribute password.



5
6
7
# File 'lib/exception_mailer.rb', line 5

def password
  @password
end

.portObject

Returns the value of attribute port.



5
6
7
# File 'lib/exception_mailer.rb', line 5

def port
  @port
end

.serverObject

Returns the value of attribute server.



5
6
7
# File 'lib/exception_mailer.rb', line 5

def server
  @server
end

.subjectObject

Returns the value of attribute subject.



5
6
7
# File 'lib/exception_mailer.rb', line 5

def subject
  @subject
end

.toObject

Returns the value of attribute to.



5
6
7
# File 'lib/exception_mailer.rb', line 5

def to
  @to
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



7
8
9
# File 'lib/exception_mailer.rb', line 7

def configure
  yield self
end

.mail_exceptions(opts = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/exception_mailer.rb', line 11

def mail_exceptions(opts={})
  yield
rescue Exception => e
  Mailer.new(opts).send_notification(e)
  raise e
end

Instance Method Details

#mail_exceptions(opts = {}, &block) ⇒ Object



24
25
26
# File 'lib/exception_mailer.rb', line 24

def mail_exceptions(opts={}, &block)
  ExceptionMailer.mail_exceptions(opts, &block)
end