Parent

Class Index [+]

Quicksearch

Mail::Retriever

Public Instance Methods

all(options = {}, &block) click to toggle source

Get all emails.

Possible options:

  order: order of emails returned. Possible values are :asc or :desc. Default value is :asc.
    # File lib/mail/network/retriever_methods/base.rb, line 38
38:     def all(options = {}, &block)
39:       options ||= {}
40:       options[:count] = :all
41:       find(options, &block)
42:     end
find_and_delete(options = {}, &block) click to toggle source

Find emails in the mailbox, and then deletes them. Without any options, the five last received emails are returned.

Possible options:

  what:  last or first emails. The default is :first.
  order: order of emails returned. Possible values are :asc or :desc. Default value is :asc.
  count: number of emails to retrieve. The default value is 10. A value of 1 returns an
         instance of Message, not an array of Message instances.
  delete_after_find: flag for whether to delete each retreived email after find. Default
          is true. Call #find if you would like this to default to false.
    # File lib/mail/network/retriever_methods/base.rb, line 55
55:     def find_and_delete(options = {}, &block)
56:       options ||= {}
57:       options[:delete_after_find] ||= true
58:       find(options, &block)      
59:     end
first(options = {}, &block) click to toggle source

Get the oldest received email(s)

Possible options:

  count: number of emails to retrieve. The default value is 1.
  order: order of emails returned. Possible values are :asc or :desc. Default value is :asc.
    # File lib/mail/network/retriever_methods/base.rb, line 13
13:     def first(options = {}, &block)
14:       options ||= {}
15:       options[:what] = :first
16:       options[:count] ||= 1
17:       find(options, &block)
18:     end
last(options = {}, &block) click to toggle source

Get the most recent received email(s)

Possible options:

  count: number of emails to retrieve. The default value is 1.
  order: order of emails returned. Possible values are :asc or :desc. Default value is :asc.
    # File lib/mail/network/retriever_methods/base.rb, line 26
26:     def last(options = {}, &block)
27:       options ||= {}
28:       options[:what] = :last
29:       options[:count] ||= 1
30:       find(options, &block)
31:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.