Class: Minke::Helpers::Copy
- Inherits:
-
Object
- Object
- Minke::Helpers::Copy
- Defined in:
- lib/minke/helpers/copy.rb
Instance Method Summary collapse
-
#copy_assets(from, to) ⇒ Object
copy assets from one location to another.
Instance Method Details
#copy_assets(from, to) ⇒ Object
copy assets from one location to another
6 7 8 9 10 11 12 13 14 |
# File 'lib/minke/helpers/copy.rb', line 6 def copy_assets from, to directory = to if File.directory?(to) directory = File.dirname(to) end Dir.mkdir directory unless Dir.exist? to FileUtils.cp_r from, to end |