Class Contract::Check::Any
In: lib/contract/integration.rb
Parent: Base
Method Contract Module UnboundMethod Contract::Check::Any Contract::Check::All Contract::Check::None Contract::Check::Block Contract::Check::Base Contract::Check::Quack MethodSignatureMixin Kernel lib/contract/integration.rb

Checks that at least one of the specified conditions match. Example:

  signature :x, Contract::Check::Any[String, Symbol]

Methods

===  

Public Instance methods

[Source]

    # File lib/contract/integration.rb, line 70
70:       def ===(other)
71:         @args.any? { |arg| arg === other }
72:       end

[Validate]