Class: ActionmailLogger::Logger
- Inherits:
-
Object
- Object
- ActionmailLogger::Logger
- Defined in:
- lib/actionmail_logger/logger.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #deliver!(mail) ⇒ Object
-
#initialize(options = {}) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize(options = {}) ⇒ Logger
Returns a new instance of Logger.
4 5 6 |
# File 'lib/actionmail_logger/logger.rb', line 4 def initialize( = {}) @logger = .fetch(:logger) { Rails.logger } end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
3 4 5 |
# File 'lib/actionmail_logger/logger.rb', line 3 def logger @logger end |
Instance Method Details
#deliver!(mail) ⇒ Object
8 9 10 |
# File 'lib/actionmail_logger/logger.rb', line 8 def deliver!(mail) logger.info(mail.encoded) end |