Class: Slidr::Commands::CopyDirCommand

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

Instance Method Summary collapse

Methods inherited from BaseCommand

#execute

Constructor Details

#initialize(from, to) ⇒ CopyDirCommand

Returns a new instance of CopyDirCommand.



7
8
9
10
# File 'lib/slidr/commands/copy_dir_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_dir_command.rb', line 12

def go
  FileUtils.cp_r(Dir["#{ @from }/*"], @to)
end