Class: BiblioTech::Builders::FileOutput

Inherits:
File
  • Object
show all
Defined in:
lib/bibliotech/builders/file.rb

Direct Known Subclasses

GzipCompressor, IdentityFileOutput

Instance Attribute Summary

Attributes inherited from Base

#config

Class Method Summary collapse

Methods inherited from File

#file, find_class

Methods inherited from Base

adapter_registry, for, #initialize, null_adapter, register, registry, supported_adapters

Constructor Details

This class inherits a constructor from BiblioTech::Builders::Base

Class Method Details

.find_explicit(config) ⇒ Object



44
45
46
47
48
49
# File 'lib/bibliotech/builders/file.rb', line 44

def self.find_explicit(config)
  return adapter_registry.fetch(config.compressor) do
    raise "config.compressor is #{config.compressor.inspect} - supported compressors are #{supported_adapters.select{|ad| ad.is_a? Symbol}.join(", ")}"
  end
rescue KeyError
end

.identity_adapterObject



40
41
42
# File 'lib/bibliotech/builders/file.rb', line 40

def self.identity_adapter
  IdentityFileOutput
end

.registry_hostObject



51
52
53
# File 'lib/bibliotech/builders/file.rb', line 51

def self.registry_host
  FileOutput
end