Module: Batch::Images
- Included in:
- Myfdb::Batch
- Defined in:
- lib/myfdb/batch/images.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/myfdb/batch/images.rb', line 6 def self.included(base) base.class_eval do attr_reader :directory, :id, :uri def errors @errors ||= [] end end end |
Instance Method Details
#images ⇒ Object
20 21 22 |
# File 'lib/myfdb/batch/images.rb', line 20 def images Dir.glob(File.join directory, '*.{jpeg,JPEG,jpg,JPG}') end |
#images? ⇒ Boolean
16 17 18 |
# File 'lib/myfdb/batch/images.rb', line 16 def images? !images.empty? end |
#process_images ⇒ Object
24 25 26 |
# File 'lib/myfdb/batch/images.rb', line 24 def process_images upload if id end |