Class: MailCatcher::API::Mailbox

Inherits:
Object
  • Object
show all
Defined in:
lib/mailcatcher/api/mailbox.rb,
lib/mailcatcher/api/mailbox/message.rb,
lib/mailcatcher/api/mailbox/message_collection.rb

Defined Under Namespace

Classes: Message, MessageCollection

Instance Method Summary collapse

Instance Method Details

#countObject


7
8
9
# File 'lib/mailcatcher/api/mailbox.rb', line 7

def count
  messages.count
end

#messages(reload: false) ⇒ Object


11
12
13
14
# File 'lib/mailcatcher/api/mailbox.rb', line 11

def messages(reload: false)
  @collection = nil if reload == true
  @collection ||= MessageCollection.new
end