Class: AdLocalize::Interactors::DownloadSpreadsheets
- Inherits:
-
Object
- Object
- AdLocalize::Interactors::DownloadSpreadsheets
- Defined in:
- lib/ad_localize/interactors/download_spreadsheets.rb
Instance Method Summary collapse
- #call(export_request:) ⇒ Object
-
#initialize ⇒ DownloadSpreadsheets
constructor
A new instance of DownloadSpreadsheets.
Constructor Details
#initialize ⇒ DownloadSpreadsheets
Returns a new instance of DownloadSpreadsheets.
5 6 7 |
# File 'lib/ad_localize/interactors/download_spreadsheets.rb', line 5 def initialize @drive_repository = Repositories::DriveRepository.new end |
Instance Method Details
#call(export_request:) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/ad_localize/interactors/download_spreadsheets.rb', line 9 def call(export_request:) LOGGER.debug("Downloading spreadsheets") if export_request.export_all @drive_repository.download_all_sheets(spreadsheet_id: export_request.spreadsheet_id) else @drive_repository.download_sheets_by_id(spreadsheet_id: export_request.spreadsheet_id, sheet_ids: export_request.sheet_ids) end end |