Sha256: 38aa143aaacfe10ed33a0bbe1f4438e12e6922dcb1f91902aaa6166764f0954c
Contents?: true
Size: 504 Bytes
Versions: 29
Compression:
Stored size: 504 Bytes
Contents
module Shoulda module Matchers module Integrations # @private class Registry def register(klass, name) registry[name] = klass end def find!(name) find_class!(name).new end private def registry @_registry ||= {} end def find_class!(name) registry.fetch(name) do raise ArgumentError, "'#{name}' is not registered" end end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems