Class: Kreegerator::Retina
- Inherits:
-
Object
- Object
- Kreegerator::Retina
- Defined in:
- lib/kreegerator/retina.rb
Class Method Summary collapse
Class Method Details
.downscale(glob, opts) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/kreegerator/retina.rb', line 12 def downscale(glob, opts) if glob.nil? puts "You must specify a file match glob (like 'tmp/*.png') or I won't know what to do!" return end Dir[glob].select { |f| f =~ /\.png\Z/i }.each do |file| puts "Downscaling #{file}." scale_image file, 0.5, true crunch_image(file, opts[:pngnq]) if opts[:pngnq] end end |
.list ⇒ Object
8 9 10 |
# File 'lib/kreegerator/retina.rb', line 8 def list puts methods(false).select { |m| m != :list }.join("\n") end |