Class: Clickwrap::Integrity::Chain::Result
- Inherits:
-
Data
- Object
- Data
- Clickwrap::Integrity::Chain::Result
- Defined in:
- lib/clickwrap/integrity/chain.rb
Instance Attribute Summary collapse
-
#breaks ⇒ Object
readonly
Returns the value of attribute breaks.
-
#chaining_enabled ⇒ Object
readonly
Returns the value of attribute chaining_enabled.
-
#checked ⇒ Object
readonly
Returns the value of attribute checked.
-
#documented_dispositions ⇒ Object
readonly
Returns the value of attribute documented_dispositions.
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
-
#started_mid_chain ⇒ Object
readonly
Returns the value of attribute started_mid_chain.
-
#verified ⇒ Object
readonly
Returns the value of attribute verified.
Instance Method Summary collapse
Instance Attribute Details
#breaks ⇒ Object (readonly)
Returns the value of attribute breaks
59 60 61 |
# File 'lib/clickwrap/integrity/chain.rb', line 59 def breaks @breaks end |
#chaining_enabled ⇒ Object (readonly)
Returns the value of attribute chaining_enabled
59 60 61 |
# File 'lib/clickwrap/integrity/chain.rb', line 59 def chaining_enabled @chaining_enabled end |
#checked ⇒ Object (readonly)
Returns the value of attribute checked
59 60 61 |
# File 'lib/clickwrap/integrity/chain.rb', line 59 def checked @checked end |
#documented_dispositions ⇒ Object (readonly)
Returns the value of attribute documented_dispositions
59 60 61 |
# File 'lib/clickwrap/integrity/chain.rb', line 59 def documented_dispositions @documented_dispositions end |
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes
59 60 61 |
# File 'lib/clickwrap/integrity/chain.rb', line 59 def scopes @scopes end |
#started_mid_chain ⇒ Object (readonly)
Returns the value of attribute started_mid_chain
59 60 61 |
# File 'lib/clickwrap/integrity/chain.rb', line 59 def started_mid_chain @started_mid_chain end |
#verified ⇒ Object (readonly)
Returns the value of attribute verified
59 60 61 |
# File 'lib/clickwrap/integrity/chain.rb', line 59 def verified @verified end |
Instance Method Details
#counts ⇒ Object
71 72 73 74 75 76 77 78 79 |
# File 'lib/clickwrap/integrity/chain.rb', line 71 def counts { "checked" => checked, "verified" => verified, "documented_dispositions" => documented_dispositions, "breaks" => breaks.length, "scopes" => scopes.length } end |
#first_break ⇒ Object
69 |
# File 'lib/clickwrap/integrity/chain.rb', line 69 def first_break = breaks.first |
#success? ⇒ Boolean
68 |
# File 'lib/clickwrap/integrity/chain.rb', line 68 def success? = breaks.empty? |
#to_h ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/clickwrap/integrity/chain.rb', line 81 def to_h { "chaining_enabled" => chaining_enabled, "counts" => counts, "scopes" => scopes, "started_mid_chain" => started_mid_chain, "first_break" => first_break&.to_h, "breaks" => breaks.map(&:to_h), "detects" => "An event rewritten or removed after it was written, for as long as the " \ "chain head remains trustworthy. Not a rewrite of the events and their " \ "digests together by a privileged actor." } end |