Module: TypeConstraints
- Defined in:
- lib/type_constraints.rb,
lib/type_constraints/meta.rb,
lib/type_constraints/version.rb,
lib/type_constraints/registry.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.0.1"
Class Attribute Summary collapse
-
.registry ⇒ Object
Returns the value of attribute registry.
Class Method Summary collapse
Class Attribute Details
.registry ⇒ Object
Returns the value of attribute registry.
7 8 9 |
# File 'lib/type_constraints.rb', line 7 def registry @registry end |
Class Method Details
.check?(name, val) ⇒ Boolean
14 15 16 17 |
# File 'lib/type_constraints.rb', line 14 def check?(name, val) return false if registry.[name].nil? registry.[name].check?(val) end |