Method: RubiGen::Commands::Create#mirror

Defined in:
lib/rubigen_ext.rb

#mirror(relative_source, relative_destination) ⇒ Object

Copy one directory to another in destination_path Can be useful to duplicate index from development to production, instead of indexing twice.



15
16
17
18
19
20
# File 'lib/rubigen_ext.rb', line 15

def mirror(relative_source,relative_destination)
  logger.mirror "#{relative_source} -> #{relative_destination}"
  source      = destination_path(relative_source)
  destination = destination_path(relative_destination)
  FileUtils.cp_r source, destination
end