Takes a value v. If the argument is .equal to
v, the contract passes, otherwise the contract fails. Example:
Eq[Class]
# File lib/contracts/builtin_contracts.rb, line 237 def initialize(value) @value = value end
# File lib/contracts/builtin_contracts.rb, line 245 def to_s "to be equal to #{@value.inspect}" end
# File lib/contracts/builtin_contracts.rb, line 241 def valid?(val) @value.equal?(val) end