Class: MailMessageObserver

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMailMessageObserver

Returns a new instance of MailMessageObserver.



26
27
28
# File 'lib/message_observers.rb', line 26

def initialize
  @messages = []
end

Instance Attribute Details

#messagesObject (readonly)

Returns the value of attribute messages.



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

def messages
  @messages
end

Instance Method Details

#update(message_string) ⇒ Object



30
31
32
# File 'lib/message_observers.rb', line 30

def update(message_string)
  @messages << Mail.read_from_string(message_string)
end