Class: Contract::Check::Quack

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

Overview

Checks that all the specified methods are answered. Example:

signature :x, Contract::Check::Quack[:to_sym]

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



50
51
52
# File 'lib/contract/integration.rb', line 50

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