Module: HasMessages::InstanceMethods

Defined in:
lib/has_messages.rb

Instance Method Summary collapse

Instance Method Details

#sent_messagesObject

Composed messages that have already been sent. These consists of all messages that are currently in the “queued” or “sent” states.



64
65
66
# File 'lib/has_messages.rb', line 64

def sent_messages
  messages.with_states(:queued, :sent)
end

#unsent_messagesObject

Composed messages that have not yet been sent. These consists of all messages that are currently in the “unsent” state.



58
59
60
# File 'lib/has_messages.rb', line 58

def unsent_messages
  messages.with_state(:unsent)
end