Class: Hashape::Specifiers::Many
Overview
Requires that the value be an enumerable, where each item matches the given type spec.
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
56 57 58 |
# File 'lib/hashape.rb', line 56 def ===(v) v.is_a?(Enumerable) && v.all? { |i| self.spec === i } end |