Sha256: 0c3d4dcc06f6376752bf10a371f07215fc6bc4689a5d1c76d372f8b6f9b644df
Contents?: true
Size: 633 Bytes
Versions: 13
Compression:
Stored size: 633 Bytes
Contents
module Shoulda module Matchers module Doublespeak # @private module DoubleImplementationRegistry class << self def find(type) find_class!(type).create end def register(klass, type) registry[type] = klass end private def find_class!(type) registry.fetch(type) do raise ArgumentError, 'No double implementation class found for'\ " '#{type}'" end end def registry @_registry ||= {} end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems