Class: Conflate::Conflator
- Inherits:
-
Object
- Object
- Conflate::Conflator
- Defined in:
- lib/conflate/conflator.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path, config) ⇒ Conflator
constructor
Public: Initialize a new Conflator.
-
#perform ⇒ Object
Public: Process the configuration.
Constructor Details
#initialize(path, config) ⇒ Conflator
Public: Initialize a new Conflator
path - Path the directory containing YAML configs (e.g., Rails.root.join(“config”)) config - Object to receive the config entries (e.g., Rails.application.config)
20 21 22 23 |
# File 'lib/conflate/conflator.rb', line 20 def initialize(path, config) self.path = path self.config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
14 15 16 |
# File 'lib/conflate/conflator.rb', line 14 def config @config end |
#path ⇒ Object
Returns the value of attribute path.
14 15 16 |
# File 'lib/conflate/conflator.rb', line 14 def path @path end |
Instance Method Details
#perform ⇒ Object
Public: Process the configuration
26 27 28 29 30 |
# File 'lib/conflate/conflator.rb', line 26 def perform config_paths.each do |filename| Conflation.new(filename, config).apply end end |