Sha256: 695fe89ecbb569af223873bcb3e383469b4e3f2b58d6ce86d36cb35960a06985
Contents?: true
Size: 896 Bytes
Versions: 2
Compression:
Stored size: 896 Bytes
Contents
module IconCreater class Create def initialize(ahash) @ahash = ahash end def createicon(input ,output) @ahash.each do |key,value| if File::exist?(input) if output == nil oput = `pwd`.chomp! elsif File::ftype(output).eql?'directory' oput = output else p '输出路径并不是文件夹' exit 0 end `/usr/local/bin/convert -resize #{value}x#{value} #{input} #{oput}/#{key}` else p '输入路径无图片' exit 0 end end p "输入图片路径:#{input}" if File::exist?(input) p "默认输出图片路径:#{`pwd`.chomp!}" if output == nil p "输出图片路径:#{output}" unless output == nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
iconCreater-0.2.9 | lib/iconCreater/create.rb |
iconCreater-0.2.8 | lib/iconCreater/create.rb |