Method: DesignByContract::Interface#==

Defined in:
lib/design_by_contract/interface.rb

#==(oth_interface) ⇒ Object



30
31
32
33
34
35
36
37
38
# File 'lib/design_by_contract/interface.rb', line 30

def ==(oth_interface)
  return false unless @method_specifications.length == oth_interface.method_specifications.length

  @method_specifications.each do |name, spec|
    return false unless oth_interface.method_specifications[name] && oth_interface.method_specifications[name] == spec
  end

  return true
end