Class: Imagga::CropInfo
- Inherits:
-
ImageInfoBase
- Object
- ImageInfoBase
- Imagga::CropInfo
- Defined in:
- lib/imagga/image.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build_image_crops(image_crop_nodes) ⇒ Object
-
#initialize(opts = {}) ⇒ CropInfo
constructor
A new instance of CropInfo.
Constructor Details
#initialize(opts = {}) ⇒ CropInfo
Returns a new instance of CropInfo.
100 101 102 103 104 105 |
# File 'lib/imagga/image.rb', line 100 def initialize(opts={}) super({'url' => opts['url']}) self.class.crop_fields.each do |field| send("#{field}=", build_image_crops(opts[field])) end end |
Class Method Details
.crop_fields ⇒ Object
96 97 98 |
# File 'lib/imagga/image.rb', line 96 def self.crop_fields %w(croppings) end |
.fields ⇒ Object
92 93 94 |
# File 'lib/imagga/image.rb', line 92 def self.fields %w(url) end |