Class: Clickwrap::ReceiptVerifier::Check
- Inherits:
-
Data
- Object
- Data
- Clickwrap::ReceiptVerifier::Check
- Defined in:
- lib/clickwrap/receipt_verifier.rb
Overview
One thing that was looked at, and what was found. passed is nil for a
check that could not be run — a document whose bytes were not supplied is
neither a pass nor a failure, and collapsing the three states into two is
how "we did not look" becomes "we looked and it was fine".
Instance Attribute Summary collapse
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#passed ⇒ Object
readonly
Returns the value of attribute passed.
Instance Method Summary collapse
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail
93 94 95 |
# File 'lib/clickwrap/receipt_verifier.rb', line 93 def detail @detail end |
#name ⇒ Object (readonly)
Returns the value of attribute name
93 94 95 |
# File 'lib/clickwrap/receipt_verifier.rb', line 93 def name @name end |
#passed ⇒ Object (readonly)
Returns the value of attribute passed
93 94 95 |
# File 'lib/clickwrap/receipt_verifier.rb', line 93 def passed @passed end |
Instance Method Details
#failed? ⇒ Boolean
95 |
# File 'lib/clickwrap/receipt_verifier.rb', line 95 def failed? = passed == false |
#passed? ⇒ Boolean
94 |
# File 'lib/clickwrap/receipt_verifier.rb', line 94 def passed? = passed == true |
#skipped? ⇒ Boolean
96 |
# File 'lib/clickwrap/receipt_verifier.rb', line 96 def skipped? = passed.nil? |
#status_word ⇒ Object
99 100 101 102 103 104 |
# File 'lib/clickwrap/receipt_verifier.rb', line 99 def status_word return "ok" if passed? return "FAILED" if failed? "skipped" end |
#to_s ⇒ Object
97 |
# File 'lib/clickwrap/receipt_verifier.rb', line 97 def to_s = "#{status_word} #{name}: #{detail}" |