Class: GovukContentModels::ActionProcessors::BaseProcessor
- Inherits:
-
Object
- Object
- GovukContentModels::ActionProcessors::BaseProcessor
- Defined in:
- lib/govuk_content_models/action_processors/base_processor.rb
Direct Known Subclasses
ApproveFactCheckProcessor, ApproveReviewProcessor, ArchiveProcessor, AssignProcessor, CancelScheduledPublishingProcessor, CreateEditionProcessor, EmergencyPublishProcessor, NewVersionProcessor, PublishProcessor, ReceiveFactCheckProcessor, RequestAmendmentsProcessor, RequestReviewProcessor, ScheduleForPublishingProcessor, SendFactCheckProcessor, SkipFactCheckProcessor, SkipReviewProcessor
Instance Attribute Summary collapse
-
#action_attributes ⇒ Object
Returns the value of attribute action_attributes.
-
#actor ⇒ Object
Returns the value of attribute actor.
-
#edition ⇒ Object
Returns the value of attribute edition.
-
#event_attributes ⇒ Object
Returns the value of attribute event_attributes.
Instance Method Summary collapse
-
#initialize(actor, edition, action_attributes = {}, event_attributes = {}) ⇒ BaseProcessor
constructor
A new instance of BaseProcessor.
- #processed_edition ⇒ Object
Constructor Details
#initialize(actor, edition, action_attributes = {}, event_attributes = {}) ⇒ BaseProcessor
Returns a new instance of BaseProcessor.
6 7 8 9 10 11 |
# File 'lib/govuk_content_models/action_processors/base_processor.rb', line 6 def initialize(actor, edition, action_attributes={}, event_attributes={}) @actor = actor @edition = edition @action_attributes = action_attributes @event_attributes = event_attributes end |
Instance Attribute Details
#action_attributes ⇒ Object
Returns the value of attribute action_attributes.
4 5 6 |
# File 'lib/govuk_content_models/action_processors/base_processor.rb', line 4 def action_attributes @action_attributes end |
#actor ⇒ Object
Returns the value of attribute actor.
4 5 6 |
# File 'lib/govuk_content_models/action_processors/base_processor.rb', line 4 def actor @actor end |
#edition ⇒ Object
Returns the value of attribute edition.
4 5 6 |
# File 'lib/govuk_content_models/action_processors/base_processor.rb', line 4 def edition @edition end |
#event_attributes ⇒ Object
Returns the value of attribute event_attributes.
4 5 6 |
# File 'lib/govuk_content_models/action_processors/base_processor.rb', line 4 def event_attributes @event_attributes end |
Instance Method Details
#processed_edition ⇒ Object
13 14 15 16 17 18 |
# File 'lib/govuk_content_models/action_processors/base_processor.rb', line 13 def processed_edition if process? && process record_action if record_action? edition end end |