Class: Ddr::Derivatives::MultiresImage
Instance Attribute Summary
Attributes inherited from Derivative
#generator, #workdir
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Derivative
#generate!, #initialize
Class Method Details
.generatable?(object) ⇒ Boolean
4
5
6
7
8
|
# File 'lib/ddr/derivatives/multires_image.rb', line 4
def self.generatable?(object)
object.can_have_multires_image? &&
object.has_content? &&
(object.content_type == "image/tiff" || object.content_type == "image/jpeg")
end
|
.has_derivative?(object) ⇒ Boolean
10
11
12
|
# File 'lib/ddr/derivatives/multires_image.rb', line 10
def self.has_derivative?(object)
object.has_multires_image?
end
|
Instance Method Details
#delete!(object) ⇒ Object
14
15
16
17
|
# File 'lib/ddr/derivatives/multires_image.rb', line 14
def delete!(object)
object.multires_image_file_path = nil
object.save
end
|