Class: Hydra::Derivatives::RemoteSourceFile

Inherits:
Object
  • Object
show all
Defined in:
lib/hydra/derivatives/services/remote_source_file.rb

Class Method Summary collapse

Class Method Details

.call(object, options) {|String| ... } ⇒ Object

Finds the file name of the remote source file.

Parameters:

  • object (String, ActiveFedora::Base)

    file name, or an object that has a method that will return the file name

  • options (Hash)

Options Hash (options):

  • :source (Symbol)

    a method that can be called on the object to retrieve the source file’s name

Yields:

  • (String)

    the file name



14
15
16
17
# File 'lib/hydra/derivatives/services/remote_source_file.rb', line 14

def self.call(object, options, &_block)
  source_name = options.fetch(:source, :to_s)
  yield(object.send(source_name))
end