Class: Contract::Check::Any
Overview
Checks that at least one of the specified conditions match. Example:
signature :x, Contract::Check::Any[String, Symbol]
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Contract::Check::Base
Instance Method Details
#===(other) ⇒ Object
70 71 72 |
# File 'lib/contract/integration.rb', line 70 def ===(other) @args.any? { |arg| arg === other } end |