Sha256: 8c8a5ab40fdc749daaf921e4be1bfdc46f595d39e96ce903a7636dc0c07f9730
Contents?: true
Size: 346 Bytes
Versions: 15
Compression:
Stored size: 346 Bytes
Contents
class Container class KeyNotFoundError < ::KeyError attr_reader :key def initialize(key) @key = key super end end def initialize @data = {} end def resolve(key) @data.fetch(key) rescue ::KeyError raise KeyNotFoundError.new(key) end def register(key, value) @data[key] = value end end
Version data entries
15 entries across 15 versions & 1 rubygems