Method: Contract#maybe_append_block!

Defined in:
lib/contracts.rb

#maybe_append_block!(args, blk) ⇒ Object

a better way to handle this might be to take this into account before throwing a “mismatched # of args” error.



236
237
238
239
240
# File 'lib/contracts.rb', line 236

def maybe_append_block! args, blk
  return unless @has_proc_contract && !blk &&
      (@args_contract_index || args.size < args_contracts.size)
  args << nil
end