Class: ChupaText::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/chupa-text/configuration.rb

Defined Under Namespace

Classes: DecomposerConfiguration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



34
35
36
37
# File 'lib/chupa-text/configuration.rb', line 34

def initialize
  @decomposer = DecomposerConfiguration.new
  @mime_type_registry = MIMEType.registry
end

Instance Attribute Details

#decomposerObject (readonly)

Returns the value of attribute decomposer.



32
33
34
# File 'lib/chupa-text/configuration.rb', line 32

def decomposer
  @decomposer
end

#mime_type_registryObject

Returns the value of attribute mime_type_registry.



33
34
35
# File 'lib/chupa-text/configuration.rb', line 33

def mime_type_registry
  @mime_type_registry
end

Class Method Details

.defaultObject



20
21
22
# File 'lib/chupa-text/configuration.rb', line 20

def default
  @default ||= load_default
end

.load_defaultObject



24
25
26
27
28
29
# File 'lib/chupa-text/configuration.rb', line 24

def load_default
  configuration = new
  loader = ConfigurationLoader.new(configuration)
  loader.load("chupa-text.conf")
  configuration
end