Sha256: 3264ccfaf3565a9311559d2e918f3f8709060b5d8c3813943c66f8aec8e864e4

Contents?: true

Size: 351 Bytes

Versions: 3

Compression:

Stored size: 351 Bytes

Contents

module AppConfiguration

  module ConfigRegistry
   
    def for(config, &block)
      @configs[config] = new(".#{config}.yml") do
        prefix config
        block.call if block
      end
    end

    def [](config)
      @configs[config]
    end

    def self.extended(object)
      object.instance_variable_set("@configs", {})
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
app_configuration-0.0.3 lib/app_configuration/config_registry.rb
app_configuration-0.0.2 lib/app_configuration/config_registry.rb
app_configuration-0.0.1 lib/app_configuration/config_registry.rb