Sha256: a9f5f070c9d5f07df770eb0bcc19c2f403f0c4f5fcf1b6c11ea8dd7619e28608
Contents?: true
Size: 323 Bytes
Versions: 6
Compression:
Stored size: 323 Bytes
Contents
module FileModel::MiniMagic def mini_magic callback, &block return unless original require 'mini_magick' image = MiniMagick::Image.open(original.path) block.call image '/'.to_entry.tmp do |dir| output = dir / :tmp_image image.write output.path callback.call output end end end
Version data entries
6 entries across 6 versions & 1 rubygems