Sha256: 8d59f79ff278c751d3142c5cd05f51804684e31432bebe6d2d7545b824673151

Contents?: true

Size: 348 Bytes

Versions: 45

Compression:

Stored size: 348 Bytes

Contents

module Minke
  module Helpers
    class Copy
      ##
      # copy assets from one location to another
      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
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
minke-1.11.4 lib/minke/helpers/copy.rb
minke-1.11.3 lib/minke/helpers/copy.rb
minke-1.11.2 lib/minke/helpers/copy.rb
minke-1.11.1 lib/minke/helpers/copy.rb
minke-1.11.0 lib/minke/helpers/copy.rb