Sha256: cc7e19da07f429a51a78b6916abc6ebf5d92a48fefff369584c0ee7fba5a9274

Contents?: true

Size: 403 Bytes

Versions: 1

Compression:

Stored size: 403 Bytes

Contents

module Gitpaint
  class Config
    include Singleton

    def initialize
      defaults = YAML.load_file (File.join(File.dirname(__FILE__), '..', '..', 'config/defaults.yaml'))

      begin
        defaults.merge!(YAML.load_file "#{ENV['HOME']}/.gitpaint/config.yaml")
      rescue Errno::ENOENT
      end

      @config = OpenStruct.new defaults
    end

    def config
      @config
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gitpaint-0.1.0 lib/gitpaint/config.rb