Sha256: 4f93fc9d95fef851a4d4ee124f75b7225a953120885903501c4b5ee47d3d6c58

Contents?: true

Size: 685 Bytes

Versions: 13

Compression:

Stored size: 685 Bytes

Contents

require 'yaml'

module RubyApp
  require 'ruby_app/application'
  require 'ruby_app/log'
  require 'ruby_app/mixins/delegate_mixin'
  require 'ruby_app/mixins/hash_mixin'

  class Configuration
    extend RubyApp::Mixins::DelegateMixin

    attr_reader :document

    def self.get
      @@_configuration
    end

    def self.load!
      @@_configuration = RubyApp::Configuration.new(RubyApp::Application.options.configuration_paths)
    end

    def self.unload!
      @@_configuration = nil
    end

    private

      def initialize(paths)
        @document = {}
        paths.each do |path|
          @document.merge!(YAML::load(File.open(path)))
        end
      end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
RubyApp-0.0.77 lib/ruby_app/configuration.rb
RubyApp-0.0.76 lib/ruby_app/configuration.rb
RubyApp-0.0.75 lib/ruby_app/configuration.rb
RubyApp-0.0.74 lib/ruby_app/configuration.rb
RubyApp-0.0.73 lib/ruby_app/configuration.rb
RubyApp-0.0.72 lib/ruby_app/configuration.rb
RubyApp-0.0.71 lib/ruby_app/configuration.rb
RubyApp-0.0.70 lib/ruby_app/configuration.rb
RubyApp-0.0.69 lib/ruby_app/configuration.rb
RubyApp-0.0.68 lib/ruby_app/configuration.rb
RubyApp-0.0.64 lib/ruby_app/configuration.rb
RubyApp-0.0.63 lib/ruby_app/configuration.rb
RubyApp-0.0.62 lib/ruby_app/configuration.rb