Sha256: b723c712dee01524d9d6a95ab0890676ef758e9f27c1143aaa35db197350552e
Contents?: true
Size: 418 Bytes
Versions: 109
Compression:
Stored size: 418 Bytes
Contents
module FactoryGirl class DisallowsDuplicatesRegistry def initialize(component) @component = component end delegate :clear, :each, :find, :[], :registered?, to: :@component def register(name, item) if registered?(name) raise DuplicateDefinitionError, "#{@component.name} already registered: #{name}" else @component.register(name, item) end end end end
Version data entries
109 entries across 58 versions & 5 rubygems