Module: HasEmails::InstanceMethods

Defined in:
lib/has_emails.rb

Instance Method Summary collapse

Instance Method Details

#sent_emailsObject

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


52
53
54
# File 'lib/has_emails.rb', line 52

def sent_emails
  emails.with_states(:queued, :sent)
end

#unsent_emailsObject

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


46
47
48
# File 'lib/has_emails.rb', line 46

def unsent_emails
  emails.with_state(:unsent)
end