Module: Samvera::Derivatives::FileApplicator

Defined in:
lib/samvera/derivatives.rb

Defined Under Namespace

Classes: Strategy

Class Method Summary collapse

Class Method Details

.call(file_set:, from_location:, derivative:) ⇒ Object



173
174
175
176
177
178
179
180
181
# File 'lib/samvera/derivatives.rb', line 173

def self.call(file_set:, from_location:, derivative:)
  # rubocop:disable Rails/Blank
  return false unless from_location.present?
  # rubocop:enable Rails/Blank

  derivative.applicators.each do |applicator|
    applicator.apply!(file_set: file_set, derivative_type: derivative.type, from_location: from_location)
  end
end