Class: Mailosaur::Models::SearchCriteria
- Defined in:
- lib/Mailosaur/models/search_criteria.rb
Instance Attribute Summary collapse
-
#body ⇒ String
text body.
-
#match ⇒ String
specified criteria will be returned.
-
#sent_from ⇒ String
sent.
-
#sent_to ⇒ String
sent.
-
#subject ⇒ String
line.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ SearchCriteria
constructor
A new instance of SearchCriteria.
Methods inherited from BaseModel
Constructor Details
#initialize(data = {}) ⇒ SearchCriteria
Returns a new instance of SearchCriteria.
4 5 6 7 8 9 10 |
# File 'lib/Mailosaur/models/search_criteria.rb', line 4 def initialize(data = {}) @sent_from = data['sentFrom'] @sent_to = data['sentTo'] @subject = data['subject'] @body = data['body'] @match = data['match'] || 'ALL' end |
Instance Attribute Details
#body ⇒ String
text body.
26 27 28 |
# File 'lib/Mailosaur/models/search_criteria.rb', line 26 def body @body end |
#match ⇒ String
specified criteria will be returned. If set to ANY, results that match any of the specified criteria will be returned.
31 32 33 |
# File 'lib/Mailosaur/models/search_criteria.rb', line 31 def match @match end |
#sent_from ⇒ String
sent.
14 15 16 |
# File 'lib/Mailosaur/models/search_criteria.rb', line 14 def sent_from @sent_from end |
#sent_to ⇒ String
sent.
18 19 20 |
# File 'lib/Mailosaur/models/search_criteria.rb', line 18 def sent_to @sent_to end |
#subject ⇒ String
line.
22 23 24 |
# File 'lib/Mailosaur/models/search_criteria.rb', line 22 def subject @subject end |