Sha256: b2bd29f56d68fe4d8b44ea761832d0417ca86a938e3e4ada3bc90d75244d6bbf

Contents?: true

Size: 332 Bytes

Versions: 14

Compression:

Stored size: 332 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  class LocalFileService
    # @param [String] file_name path to the file
    # @param [Hash] _options
    # @yield [File] opens the file and yields it to the block
    def self.call(file_name, _options)
      File.open(file_name) do |file|
        yield(file)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/services/hyrax/local_file_service.rb
hyrax-5.0.4 app/services/hyrax/local_file_service.rb
hyrax-5.0.3 app/services/hyrax/local_file_service.rb
hyrax-5.0.2 app/services/hyrax/local_file_service.rb
hyrax-5.0.1 app/services/hyrax/local_file_service.rb
hyrax-5.0.0 app/services/hyrax/local_file_service.rb
hyrax-5.0.0.rc3 app/services/hyrax/local_file_service.rb
hyrax-5.0.0.rc2 app/services/hyrax/local_file_service.rb
hyrax-5.0.0.rc1 app/services/hyrax/local_file_service.rb
hyrax-4.0.0 app/services/hyrax/local_file_service.rb
hyrax-4.0.0.rc3 app/services/hyrax/local_file_service.rb
hyrax-4.0.0.rc2 app/services/hyrax/local_file_service.rb
hyrax-4.0.0.rc1 app/services/hyrax/local_file_service.rb
hyrax-4.0.0.beta2 app/services/hyrax/local_file_service.rb