Sha256: 9091fdb4fbaacf2cfe24381b28ae411dc60e996fa7f4b6e46aa7e6e82a7aa4d8
Contents?: true
Size: 603 Bytes
Versions: 40
Compression:
Stored size: 603 Bytes
Contents
require "jsduck/logger" require "fileutils" module JsDuck module Img # Copies images to destination directory. class Writer # Takes an array of image records retrieved from # Img::Dir#all_used or Img::DirSet#all_used and copies all of # them to given output directory. def self.copy(images, output_dir) images.each do |img| dest = File.join(output_dir, img[:filename]) Logger.log("Copying image", dest) FileUtils.makedirs(File.dirname(dest)) FileUtils.cp(img[:full_path], dest) end end end end end
Version data entries
40 entries across 40 versions & 3 rubygems