Method: Handshake::Clause#initialize

Defined in:
lib/handshake/clause_methods.rb

#initialize(mesg = nil, &block) ⇒ Clause

Defines a new Clause object with a block and a message. The block should return a boolean value. The message is optional but strongly recommended for human-readable contract violation errors.



11
12
13
# File 'lib/handshake/clause_methods.rb', line 11

def initialize(mesg=nil, &block) # :yields: argument
  @mesg, @block = mesg, block
end