Class: Contract::Check::All

Inherits:
Base
  • Object
show all
Defined in:
lib/contract/integration.rb

Overview

Checks that all the specified conditions match. Example:

signature :x, Contract::Check::All[Array, Enumerable]

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Contract::Check::Base

Instance Method Details

#===(other) ⇒ Object



59
60
61
# File 'lib/contract/integration.rb', line 59

def ===(other)
  @args.all? { |arg| arg === other }
end