require 'hashie' require 'singleton' require 'yaml' module TCity class Configuration include Singleton attr_reader :config def initialize @config = Hashie::Mash.new(YAML.load_file self.class.config_file_path) end private def self.method_missing(method, *args) instance.config.send method, args end def self.config_file_path "#{ENV['HOME']}/.tcity.yml" end end end