Sha256: 0e899b3d4bca0c632344ae57078a49d02ca7ac5ac689931c083ca52f01b8b733
Contents?: true
Size: 502 Bytes
Versions: 4
Compression:
Stored size: 502 Bytes
Contents
class Herder class Config attr_accessor :options def initialize self.options = YAML.load_file("config/herder.yml") rescue self.options = {} options["site"] = ENV["HERDER_SITE"] || "http://localhost" options["user"] = ENV["HERDER_USER"] || "user" options["password"] = ENV["HERDER_PASSWORD"] || "password" end def self.get key self.instance.options[key] end def self.instance @instance ||= Herder::Config.new end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
herder-0.0.5 | lib/herder/config.rb |
herder-0.0.4 | lib/herder/config.rb |
herder-0.0.2 | lib/herder/config.rb |
herder-0.0.1 | lib/herder/config.rb |