Class: Contract::Check::None

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

Overview

Checks that none of the specified conditions match. Example:

signature :x, Contract::Check::None[Numeric, Symbol]
signature :x, Contract::Check::Not[Comparable]

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



82
83
84
# File 'lib/contract/integration.rb', line 82

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