Method: Brine::TypeChecking::TypeChecks#register_matcher

Defined in:
lib/brine/type_checking.rb

#register_matcher(type, matcher) ⇒ Object

Register the provided matcher for the specified type.

@param matcher Provide a matcher to verify that input is an instance of type.

Parameters:

  • type (Class)

    Specify the type for which the Matcher will be registered.



57
58
59
# File 'lib/brine/type_checking.rb', line 57

def register_matcher(type, matcher)
  @map[type.to_sym] = matcher
end