Class: Acbaker::Processors::Constraint
- Defined in:
- lib/acbaker/processors/constraint.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Acbaker::Processors::Base
Instance Method Details
#run(image, image_spec, width = nil, height = nil) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/acbaker/processors/constraint.rb', line 5 def run(image, image_spec, width=nil, height=nil) # resize image image.change_geometry("#{width}x#{height}") do |px, py, i| image.resize!(px, py) image_spec['size'] = "#{px}x#{py}" end image end |