Class: Hashape::Specifiers::Optional
- Defined in:
- lib/hashape.rb
Overview
Allows a type spec to also be nil.
Instance Attribute Summary
Attributes inherited from Specifier
Instance Method Summary collapse
Methods inherited from Specifier
Constructor Details
This class inherits a constructor from Hashape::Specifiers::Specifier
Instance Method Details
#===(v) ⇒ Object
37 38 39 |
# File 'lib/hashape.rb', line 37 def ===(v) v.nil? || self.spec === v end |