Module: Brine::TypeChecking
- Included in:
- Brine
- Defined in:
- lib/brine/type_checking.rb
Overview
Support asserting the type of values.
Defined Under Namespace
Classes: TypeChecks
Instance Method Summary collapse
-
#type_check_for(type) ⇒ RSpec::Matcher
Return the Matcher for the specified type.
-
#type_checks ⇒ Object
Expose the currently active TypeCheck instance as a property, instantiating as needed.
Instance Method Details
permalink #type_check_for(type) ⇒ RSpec::Matcher
Return the Matcher for the specified type.
This is the primary interface for type_checking to the rest of the system, and is the only one expected to be used during test execution.
79 80 81 |
# File 'lib/brine/type_checking.rb', line 79 def type_check_for(type) type_checks.for_type(type) end |
permalink #type_checks ⇒ Object
Expose the currently active TypeCheck instance as a property, instantiating as needed.
65 66 67 |
# File 'lib/brine/type_checking.rb', line 65 def type_checks @type_check ||= TypeChecks.new end |