lib/flipper/registry.rb in flipper-0.6.1 vs lib/flipper/registry.rb in flipper-0.6.2

- old
+ new

@@ -43,14 +43,20 @@ } end def get(key) key = key.to_sym - @mutex.synchronize { @source.fetch(key) { raise KeyNotFound.new(key) } + } + end + + def key?(key) + key = key.to_sym + @mutex.synchronize { + @source.has_key?(key) } end def each(&block) @mutex.synchronize { @source.dup }.each(&block)