Class: Clickwrap::Integrity::AttestationReconciler::Result
- Inherits:
-
Data
- Object
- Data
- Clickwrap::Integrity::AttestationReconciler::Result
- Defined in:
- lib/clickwrap/integrity/attestation_reconciler.rb
Instance Attribute Summary collapse
-
#outcomes ⇒ Object
readonly
Returns the value of attribute outcomes.
Instance Method Summary collapse
- #attempted ⇒ Object
- #clean? ⇒ Boolean
- #counts ⇒ Object
- #not_recorded ⇒ Object
- #recorded ⇒ Object
- #to_h ⇒ Object
Instance Attribute Details
#outcomes ⇒ Object (readonly)
Returns the value of attribute outcomes
30 31 32 |
# File 'lib/clickwrap/integrity/attestation_reconciler.rb', line 30 def outcomes @outcomes end |
Instance Method Details
#attempted ⇒ Object
31 |
# File 'lib/clickwrap/integrity/attestation_reconciler.rb', line 31 def attempted = outcomes.length |
#clean? ⇒ Boolean
39 |
# File 'lib/clickwrap/integrity/attestation_reconciler.rb', line 39 def clean? = not_recorded.zero? |
#counts ⇒ Object
35 36 37 |
# File 'lib/clickwrap/integrity/attestation_reconciler.rb', line 35 def counts { "attempted" => attempted, "recorded" => recorded, "not_recorded" => not_recorded } end |
#not_recorded ⇒ Object
33 |
# File 'lib/clickwrap/integrity/attestation_reconciler.rb', line 33 def not_recorded = attempted - recorded |
#recorded ⇒ Object
32 |
# File 'lib/clickwrap/integrity/attestation_reconciler.rb', line 32 def recorded = outcomes.count(&:recorded?) |
#to_h ⇒ Object
40 |
# File 'lib/clickwrap/integrity/attestation_reconciler.rb', line 40 def to_h = { "counts" => counts, "outcomes" => outcomes.map(&:to_h) } |