Class: MailCatcher::API::Mailbox
- Inherits:
-
Object
- Object
- MailCatcher::API::Mailbox
- Defined in:
- lib/mailcatcher/api/mailbox.rb
Instance Attribute Summary collapse
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Instance Method Summary collapse
- #count ⇒ Object
-
#initialize ⇒ Mailbox
constructor
A new instance of Mailbox.
- #messages ⇒ Object
- #refresh ⇒ Object
Constructor Details
#initialize ⇒ Mailbox
Returns a new instance of Mailbox.
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/mailcatcher/api/mailbox.rb', line 6 def initialize @server = MailCatcher::API.config.server @connection = Faraday.new(url: @server) do |faraday| faraday.request :network_exception faraday.adapter :net_http end = nil = nil end |
Instance Attribute Details
#server ⇒ Object (readonly)
Returns the value of attribute server.
4 5 6 |
# File 'lib/mailcatcher/api/mailbox.rb', line 4 def server @server end |
Instance Method Details
#count ⇒ Object
23 24 25 |
# File 'lib/mailcatcher/api/mailbox.rb', line 23 def count .count end |
#messages ⇒ Object
27 28 29 |
# File 'lib/mailcatcher/api/mailbox.rb', line 27 def ||= end |
#refresh ⇒ Object
18 19 20 21 |
# File 'lib/mailcatcher/api/mailbox.rb', line 18 def refresh unless .nil? end |