Class: Slidr::Commands::CopyFileCommand

Inherits:
BaseCommand show all
Defined in:
lib/slidr/commands/copy_file_command.rb

Instance Method Summary collapse

Methods inherited from BaseCommand

#execute

Constructor Details

#initialize(from, to) ⇒ CopyFileCommand

Returns a new instance of CopyFileCommand.



7
8
9
10
# File 'lib/slidr/commands/copy_file_command.rb', line 7

def initialize(from, to)
  @from = from
  @to = to
end

Instance Method Details

#goObject



12
13
14
# File 'lib/slidr/commands/copy_file_command.rb', line 12

def go
  FileUtils.cp(@from, @to)
end