Class: Flickrage::Worker::Compose
- Defined in:
- lib/flickrage/worker/compose.rb
Constant Summary
Constants inherited from Base
Base::MAX_ASK_ERRORS, Base::PRINT_IMAGE_HEADERS, Base::PRINT_IMAGE_HEADERS_LITE
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods included from Helpers::Tty
Methods included from Helpers::Log
Constructor Details
This class inherits a constructor from Flickrage::Worker::Base
Instance Method Details
#call(image_list) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/flickrage/worker/compose.rb', line 5 def call(image_list) raise Flickrage::CollageError, 'Not enough images for collage' if image_list.resized&.size < 1 speaker.add_padding logger.debug('Collage building process') image_list.collage_path = init_file_name @spin = spinner(message: 'Collage making') result = service.run(image_list) if result.composed? spin.success else spin.error('(failed: Collage was not made)') raise Flickrage::CollageError end result ensure spin&.stop end |