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



7
8
9
10
11
# File 'app/services/hyrax/local_file_service.rb', line 7

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