Class: Settings::DataSource::Hash

Inherits:
Settings::DataSource show all
Defined in:
lib/settings/data_source/hash.rb

Instance Attribute Summary

Attributes inherited from Settings::DataSource

#source

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Settings::DataSource

#initialize

Constructor Details

This class inherits a constructor from Settings::DataSource

Class Method Details

.build(source) ⇒ Object



8
9
10
# File 'lib/settings/data_source/hash.rb', line 8

def self.build(source)
  new(source)
end

.loggerObject



4
5
6
# File 'lib/settings/data_source/hash.rb', line 4

def self.logger
  @logger ||= Log.get(self)
end

Instance Method Details

#get_dataObject



12
13
14
15
16
17
# File 'lib/settings/data_source/hash.rb', line 12

def get_data
  logger.trace { "Converting the raw source data to Confstruct" }
  Confstruct::Configuration.new(source).tap do |instance|
    logger.debug { "Converted the raw source data to Confstruct" }
  end
end