Class: GovukContentModels::ActionProcessors::SendFactCheckProcessor

Inherits:
BaseProcessor
  • Object
show all
Defined in:
lib/govuk_content_models/action_processors/send_fact_check_processor.rb

Instance Attribute Summary

Attributes inherited from BaseProcessor

#action_attributes, #actor, #edition, #event_attributes

Instance Method Summary collapse

Methods inherited from BaseProcessor

#initialize, #processed_edition

Constructor Details

This class inherits a constructor from GovukContentModels::ActionProcessors::BaseProcessor

Instance Method Details

#processObject



5
6
7
8
9
10
# File 'lib/govuk_content_models/action_processors/send_fact_check_processor.rb', line 5

def process
  return false if action_attributes[:email_addresses].blank?
  action_attributes[:comment] ||= "Fact check requested"

  edition.send_fact_check
end