Class: NewLead::LeadActivityProtectionResult
- Inherits:
-
Data
- Object
- Data
- NewLead::LeadActivityProtectionResult
- Defined in:
- app/services/new_lead/lead_activity_protection_result.rb
Overview
Describes how invalid-activity maintenance handled one lead activity.
invalidated records whether cancellation succeeded when the service found
cancellation safe. Statuses that preserve the activity report themselves as
skippable so the maintenance summary remains accurate.
Instance Attribute Summary collapse
-
#invalidated ⇒ Object
readonly
Returns the value of attribute invalidated.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#cancelled? ⇒ Boolean
Reports whether cancellation persisted successfully.
-
#initialize(status: nil, invalidated: false) ⇒ LeadActivityProtectionResult
constructor
Creates a maintenance result.
-
#skip_cancellation? ⇒ Boolean
Reports whether maintenance should leave the activity untouched.
Constructor Details
#initialize(status: nil, invalidated: false) ⇒ LeadActivityProtectionResult
Creates a maintenance result.
15 |
# File 'app/services/new_lead/lead_activity_protection_result.rb', line 15 def initialize(status: nil, invalidated: false) = super |
Instance Attribute Details
#invalidated ⇒ Object (readonly)
Returns the value of attribute invalidated
10 11 12 |
# File 'app/services/new_lead/lead_activity_protection_result.rb', line 10 def invalidated @invalidated end |
#status ⇒ Object (readonly)
Returns the value of attribute status
10 11 12 |
# File 'app/services/new_lead/lead_activity_protection_result.rb', line 10 def status @status end |
Instance Method Details
#cancelled? ⇒ Boolean
Reports whether cancellation persisted successfully.
27 28 29 |
# File 'app/services/new_lead/lead_activity_protection_result.rb', line 27 def cancelled? invalidated end |
#skip_cancellation? ⇒ Boolean
Reports whether maintenance should leave the activity untouched.
20 21 22 |
# File 'app/services/new_lead/lead_activity_protection_result.rb', line 20 def skip_cancellation? status.in?(%i[resolved protected guard_error]) end |