Class: AdLocalize::Interactors::ProcessExportRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/ad_localize/interactors/process_export_request.rb

Instance Method Summary collapse

Instance Method Details

#call(export_request:) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/ad_localize/interactors/process_export_request.rb', line 5

def call(export_request:)
  export_request.verbose ? LOGGER.debug! : LOGGER.info!
  LOGGER.debug(export_request)
  LOGGER.debug("Verify if there are CSV to process")
  return unless export_request.has_csv_paths?

  LOGGER.debug("Parse CSV files")
  wording = ParseCSVFiles.new.call(export_request: export_request)
  return unless wording

  LOGGER.debug("Export wording")
  ExportWording.new.call(export_request: export_request, wording: wording)
  LOGGER.debug("End of export request execution")
end