Class: MailChecker::Mail
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- MailChecker::Mail
- Defined in:
- lib/mail_checker/mail.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.any?(&block) ⇒ Boolean
15 16 17 |
# File 'lib/mail_checker/mail.rb', line 15 def self.any?(&block) all.any?(&block) end |
.destroy_all ⇒ Object
11 12 13 |
# File 'lib/mail_checker/mail.rb', line 11 def self.destroy_all connection.delete(collection_path) end |
Instance Method Details
#load(attributes, remove_root = false) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/mail_checker/mail.rb', line 19 def load(attributes, remove_root = false) super(attributes, remove_root) @attributes['sender'].gsub!(/[<>]/, '') @attributes['recipients'].map! { |r| r.gsub(/[<>]/, '') } self end |