Class: Postmark::SpamCheck::Report
- Inherits:
-
Object
- Object
- Postmark::SpamCheck::Report
- Defined in:
- lib/postmark/spam_check/report.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#error ⇒ Object
Returns the value of attribute error.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
-
#initialize(email) ⇒ Report
constructor
A new instance of Report.
- #load_results(results) ⇒ Object
Constructor Details
#initialize(email) ⇒ Report
Returns a new instance of Report.
7 8 9 10 11 12 |
# File 'lib/postmark/spam_check/report.rb', line 7 def initialize(email) @email = email @score = nil @error = nil @details = [] end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
4 5 6 |
# File 'lib/postmark/spam_check/report.rb', line 4 def details @details end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
4 5 6 |
# File 'lib/postmark/spam_check/report.rb', line 4 def email @email end |
#error ⇒ Object
Returns the value of attribute error.
5 6 7 |
# File 'lib/postmark/spam_check/report.rb', line 5 def error @error end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
4 5 6 |
# File 'lib/postmark/spam_check/report.rb', line 4 def score @score end |
Instance Method Details
#load_results(results) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/postmark/spam_check/report.rb', line 14 def load_results(results) # Truthy success means the report was generated successfully. if results['success'] results_for_success(results) else results_for_failure(results) end self end |