Module: EasyImaging::ModuleMethods

Included in:
EasyImaging
Defined in:
lib/easy_imaging.rb

Instance Method Summary collapse

Instance Method Details

#process_image(style, method_called, attr_image, *args) ⇒ Object



63
64
65
66
67
68
# File 'lib/easy_imaging.rb', line 63

def process_image(style, method_called, attr_image, *args)
  path = attr_image.path(style)
  source = MiniMagick::Image.open(path)
  source = source.send(method_called, *args)
  source.write(path)
end