Class: Rubymail::Bounce
Instance Method Summary collapse
- #add(email, options = {}) ⇒ Object
- #destroy(email) ⇒ Object
- #find(email) ⇒ Object
-
#initialize(rubymail, domain) ⇒ Bounce
constructor
A new instance of Bounce.
- #list(options = {}) ⇒ Object
Constructor Details
#initialize(rubymail, domain) ⇒ Bounce
Returns a new instance of Bounce.
3 4 5 6 |
# File 'lib/rubymail/bounce.rb', line 3 def initialize(rubymail, domain) @rubymail = rubymail @domain = domain end |
Instance Method Details
#add(email, options = {}) ⇒ Object
16 17 18 |
# File 'lib/rubymail/bounce.rb', line 16 def add(email, ={}) Rubymail.submit :post, bounce_url, {:address => email}.merge() end |
#destroy(email) ⇒ Object
20 21 22 |
# File 'lib/rubymail/bounce.rb', line 20 def destroy(email) Rubymail.submit :delete, bounce_url(email) end |
#find(email) ⇒ Object
12 13 14 |
# File 'lib/rubymail/bounce.rb', line 12 def find(email) Rubymail.submit :get, bounce_url(email) end |
#list(options = {}) ⇒ Object
8 9 10 |
# File 'lib/rubymail/bounce.rb', line 8 def list(={}) Rubymail.submit(:get, bounce_url, )["items"] || [] end |