Module: TestLink::Objects::Methods

Included in:
Node, Project, Status
Defined in:
lib/test_link/objects/methods.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/test_link/objects/methods.rb', line 20

def == other
  return false unless (self.instance_variables.count == other.instance_variables.count)
  diff = self.instance_variables.select { |prop|
    self.instance_variable_get(prop) != other.instance_variable_get(prop)
  }
  diff.empty?
end