lib/ddr/derivatives.rb in ddr-models-1.15.0 vs lib/ddr/derivatives.rb in ddr-models-1.16.0
- old
+ new
@@ -6,10 +6,13 @@
autoload :PngGenerator
autoload :PtifGenerator
Derivative = Struct.new(:name, :datastream, :generator, :options)
+ # Derivatives to generate. Array of DERIVATIVE names
+ mattr_accessor :update_derivatives
+
# Eventually, we should inject the generator (probably) and the options (certainly) for each derivative
# (e.g., from configuration)
DERIVATIVES = {
multires_image:
Derivative.new( :multires_image,
@@ -20,8 +23,13 @@
Derivative.new( :thumbnail,
Ddr::Datastreams::THUMBNAIL,
Ddr::Derivatives::PngGenerator,
"-resize '100x100>'")
}
+
+ # Yields an object with module configuration accessors
+ def self.configure
+ yield self
+ end
end
end