Class: Thwomp::ThumbnailPicker

Inherits:
Object
  • Object
show all
Defined in:
lib/thwomp/thumbnail_picker.rb

Class Method Summary collapse

Class Method Details

.pick(image_paths) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/thwomp/thumbnail_picker.rb', line 5

def self.pick(image_paths)
  path = image_paths.find do |path|
    counter = ColorCounter.new(path)
    counter.valid_png? && counter.present?
  end

  Thumbnail.generate!(path)
end