Sha256: f909ed275cadb80e0937afeeee6c32aff4d4224d10a80c990f200e398bcf7041

Contents?: true

Size: 384 Bytes

Versions: 3

Compression:

Stored size: 384 Bytes

Contents

module Equestreum
  class Config
    include Singleton

    def initialize
      @config = fetch_yaml File.join(File.dirname(__FILE__), '..', '..', 'config/equestreum.yml')
      @config.merge! fetch_yaml 'config/equestreum.yml' if File.exists? 'config/equestreum.yml'
    end

    def config
      @config
    end

    def fetch_yaml file
      YAML.load_file file
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
equestreum-0.1.4 lib/equestreum/config.rb
equestreum-0.1.3 lib/equestreum/config.rb
equestreum-0.1.2 lib/equestreum/config.rb