Class: Clickwrap::RequestEvidencePolicy::Setting
- Inherits:
-
Data
- Object
- Data
- Clickwrap::RequestEvidencePolicy::Setting
- Defined in:
- lib/clickwrap/request_evidence_policy.rb
Overview
One category's settings: whether to record it, why, how long, and what happens when it cannot be resolved.
Instance Attribute Summary collapse
-
#because ⇒ Object
readonly
Returns the value of attribute because.
-
#data_protection_impact_assessment_reference ⇒ Object
readonly
Returns the value of attribute data_protection_impact_assessment_reference.
-
#delete_after ⇒ Object
readonly
Returns the value of attribute delete_after.
-
#encrypted ⇒ Object
readonly
Returns the value of attribute encrypted.
-
#fail_if_unavailable ⇒ Object
readonly
Returns the value of attribute fail_if_unavailable.
-
#legal_basis_reference ⇒ Object
readonly
Returns the value of attribute legal_basis_reference.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
-
#retain_until ⇒ Object
readonly
Returns the value of attribute retain_until.
Instance Method Summary collapse
- #encrypted? ⇒ Boolean
- #fail_if_unavailable? ⇒ Boolean
-
#initialize(record: false, encrypted: nil, delete_after: nil, retain_until: nil, fail_if_unavailable: false, because: nil, legal_basis_reference: nil, data_protection_impact_assessment_reference: nil) ⇒ Setting
constructor
A new instance of Setting.
- #record? ⇒ Boolean
- #to_snapshot ⇒ Object
Constructor Details
#initialize(record: false, encrypted: nil, delete_after: nil, retain_until: nil, fail_if_unavailable: false, because: nil, legal_basis_reference: nil, data_protection_impact_assessment_reference: nil) ⇒ Setting
Returns a new instance of Setting.
27 28 29 30 31 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 27 def initialize(record: false, encrypted: nil, delete_after: nil, retain_until: nil, fail_if_unavailable: false, because: nil, legal_basis_reference: nil, data_protection_impact_assessment_reference: nil) super end |
Instance Attribute Details
#because ⇒ Object (readonly)
Returns the value of attribute because
23 24 25 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 23 def because @because end |
#data_protection_impact_assessment_reference ⇒ Object (readonly)
Returns the value of attribute data_protection_impact_assessment_reference
23 24 25 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 23 def data_protection_impact_assessment_reference @data_protection_impact_assessment_reference end |
#delete_after ⇒ Object (readonly)
Returns the value of attribute delete_after
23 24 25 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 23 def delete_after @delete_after end |
#encrypted ⇒ Object (readonly)
Returns the value of attribute encrypted
23 24 25 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 23 def encrypted @encrypted end |
#fail_if_unavailable ⇒ Object (readonly)
Returns the value of attribute fail_if_unavailable
23 24 25 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 23 def fail_if_unavailable @fail_if_unavailable end |
#legal_basis_reference ⇒ Object (readonly)
Returns the value of attribute legal_basis_reference
23 24 25 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 23 def legal_basis_reference @legal_basis_reference end |
#record ⇒ Object (readonly)
Returns the value of attribute record
23 24 25 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 23 def record @record end |
#retain_until ⇒ Object (readonly)
Returns the value of attribute retain_until
23 24 25 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 23 def retain_until @retain_until end |
Instance Method Details
#encrypted? ⇒ Boolean
34 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 34 def encrypted? = encrypted == true |
#fail_if_unavailable? ⇒ Boolean
35 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 35 def fail_if_unavailable? = fail_if_unavailable == true |
#record? ⇒ Boolean
33 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 33 def record? = record == true |
#to_snapshot ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/clickwrap/request_evidence_policy.rb', line 37 def to_snapshot { "record" => record?, "encrypted" => encrypted?, "delete_after_seconds" => delete_after&.to_i, "retain_until_rule" => retain_until&.to_s, "fail_if_unavailable" => fail_if_unavailable?, "because" => because, "legal_basis_reference" => legal_basis_reference, "data_protection_impact_assessment_reference" => data_protection_impact_assessment_reference }.compact end |