Class: Clickwrap::ReceiptVerifier::Check

Inherits:
Data
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#detailObject (readonly)

Returns the value of attribute detail

Returns:

  • (Object)

    the current value of detail



93
94
95
# File 'lib/clickwrap/receipt_verifier.rb', line 93

def detail
  @detail
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



93
94
95
# File 'lib/clickwrap/receipt_verifier.rb', line 93

def name
  @name
end

#passedObject (readonly)

Returns the value of attribute passed

Returns:

  • (Object)

    the current value of passed



93
94
95
# File 'lib/clickwrap/receipt_verifier.rb', line 93

def passed
  @passed
end

Instance Method Details

#failed?Boolean

Returns:

  • (Boolean)


95
# File 'lib/clickwrap/receipt_verifier.rb', line 95

def failed? = passed == false

#passed?Boolean

Returns:

  • (Boolean)


94
# File 'lib/clickwrap/receipt_verifier.rb', line 94

def passed? = passed == true

#skipped?Boolean

Returns:

  • (Boolean)


96
# File 'lib/clickwrap/receipt_verifier.rb', line 96

def skipped? = passed.nil?

#status_wordObject



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_sObject



97
# File 'lib/clickwrap/receipt_verifier.rb', line 97

def to_s = "#{status_word} #{name}: #{detail}"