Class: BiblioTech::Builders::FileInput

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

Direct Known Subclasses

GzipExpander, IdentityFileInput

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



31
32
33
34
35
36
37
# File 'lib/bibliotech/builders/file.rb', line 31

def self.find_explicit(config)
  return adapter_registry.fetch(config.expander) do
    raise "config.expander is #{config.expander.inspect} - supported expanders are #{supported_adapters.select{|ad| ad.is_a? Symbol}.join(", ")}"
  end
rescue Config::MissingConfig
  nil
end

.identity_adapterObject



27
28
29
# File 'lib/bibliotech/builders/file.rb', line 27

def self.identity_adapter
  IdentityFileInput
end

.registry_hostObject



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

def self.registry_host
  FileInput
end