Class: Wordmove::Actions::GetFile
- Inherits:
-
Object
- Object
- Wordmove::Actions::GetFile
- Extended by:
- LightService::Action
- Includes:
- Helpers
- Defined in:
- lib/wordmove/actions/get_file.rb
Overview
Note:
The remote server is already configured inside the Photocopier object
Note:
This action is not meant to be organized, but as a standalone one.
Download a single file from the remote server.
Class Method Summary collapse
-
.execute ⇒ LightService::Context
Action’s context.
Class Method Details
.execute ⇒ LightService::Context
Returns Action’s context.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/wordmove/actions/get_file.rb', line 23 executed do |context| command = 'get' context.logger.task_step false, "#{command}: #{context.command_args.join(' ')}" next context if simulate?(cli_options: context.) result = context.photocopier.send(command, *context.command_args) next context if result == true context.fail! "Failed to download file: #{context.command_args.first}" end |