Class: Chatterbox::EmailConsumer

Inherits:
Object
  • Object
show all
Defined in:
lib/consumers/email_consumer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(notice) ⇒ EmailConsumer

Returns a new instance of EmailConsumer.



6
7
8
# File 'lib/consumers/email_consumer.rb', line 6

def initialize(notice)
  @notice = notice
end

Instance Attribute Details

#noticeObject (readonly)

Returns the value of attribute notice.



4
5
6
# File 'lib/consumers/email_consumer.rb', line 4

def notice
  @notice
end

Instance Method Details

#processObject



10
11
12
13
# File 'lib/consumers/email_consumer.rb', line 10

def process
  Chatterbox.logger.debug { "Mailing notification #{notice[:summary]}"}
  Mailer.deliver_exception_notification(notice)
end