Class: Slidr::Commands::CopyDirCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Slidr::Commands::CopyDirCommand
- Defined in:
- lib/slidr/commands/copy_dir_command.rb
Instance Method Summary collapse
- #go ⇒ Object
-
#initialize(from, to) ⇒ CopyDirCommand
constructor
A new instance of CopyDirCommand.
Methods inherited from BaseCommand
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
#go ⇒ Object
12 13 14 |
# File 'lib/slidr/commands/copy_dir_command.rb', line 12 def go FileUtils.cp_r(Dir["#{ @from }/*"], @to) end |