Class: Hyrax::LocalFileService

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/local_file_service.rb

Class Method Summary collapse

Class Method Details

.call(file_name, _options) {|File| ... } ⇒ Object

Parameters:

  • file_name (String)

    path to the file

  • _options (Hash)

Yields:

  • (File)

    opens the file and yields it to the block



6
7
8
# File 'app/services/hyrax/local_file_service.rb', line 6

def self.call(file_name, _options)
  yield File.open(file_name)
end