Sha256: 5aaa43c5dfe65681a228d821e317078cef82b5bee7ca222ba7368af82623407c
Contents?: true
Size: 556 Bytes
Versions: 15
Compression:
Stored size: 556 Bytes
Contents
module Firefly class Config < Hash DEFAULTS = { :hostname => "localhost:3000", :api_key => "test", :database => "sqlite3://#{Dir.pwd}/firefly_#{ENV['RACK_ENV']}.sqlite3", :recent_urls => 25, :tweet => "Check this out: %short_url%" } def initialize obj self.update DEFAULTS self.update obj end def set key, val = nil, &blk if val.is_a? Hash self[key].update val else self[key] = block_given?? blk : val end end end end
Version data entries
15 entries across 15 versions & 1 rubygems