Class Contract::Check::Block
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 the specified block matches. Example:

  signature :x, Contract::Check.block { |arg| arg > 0 }

Methods

===  

Public Instance methods

[Source]

    # File lib/contract/integration.rb, line 37
37:       def ===(other)
38:         @block.call(other)
39:       end

[Validate]