Class: Ddr::Derivatives::Thumbnail
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
|
# File 'lib/ddr/derivatives/thumbnail.rb', line 4
def self.generatable?(object)
object.can_have_thumbnail? && object.has_content? && object.image?
end
|
.has_derivative?(object) ⇒ Boolean
8
9
10
|
# File 'lib/ddr/derivatives/thumbnail.rb', line 8
def self.has_derivative?(object)
object.has_thumbnail?
end
|
Instance Method Details
#delete!(object) ⇒ Object
12
13
14
15
|
# File 'lib/ddr/derivatives/thumbnail.rb', line 12
def delete!(object)
object.thumbnail.content = ''
object.save
end
|