Sha256: dac01ee511d0c54b934ca100504c8e5312fd306e660e732bbafc5e7d647023a7
Contents?: true
Size: 335 Bytes
Versions: 5
Compression:
Stored size: 335 Bytes
Contents
class Armoire class Setting def initialize(setting) @setting = setting end def [](key) value = setting.fetch(key.to_s) do raise ConfigSettingMissing, %Q{"#{key}" is not set} end value.kind_of?(Hash) ? self.class.new(value) : value end private attr_reader :setting end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
armoire-1.4.1 | lib/armoire/setting.rb |
armoire-1.4.0 | lib/armoire/setting.rb |
armoire-1.3.0 | lib/armoire/setting.rb |
armoire-1.2.1 | lib/armoire/setting.rb |
armoire-1.1.0 | lib/armoire/setting.rb |