Sha256: 3e993b1f5db2b05acdf9264d70a32f2206a7b72e19bf13414468f0c8153b80ea
Contents?: true
Size: 687 Bytes
Versions: 33
Compression:
Stored size: 687 Bytes
Contents
# encoding: UTF-8 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%", :hyves_title => "Check this out", :hyves_body => "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
33 entries across 33 versions & 3 rubygems