module Lutaml::Model::ComparableModel
def self.included(base)
def self.included(base) base.extend(ClassMethods) end
def eql?(other)
-
(Boolean)
- True if objects are equal, false otherwise
Parameters:
-
other
(Object
) -- The object to compare with
def eql?(other) other.class == self.class && self.class.attributes.all? do |attr, _| send(attr) == other.send(attr) end end
def hash
-
(Integer)
- The hash value
def hash ([self.class] + self.class.attributes.map do |attr, _| send(attr).hash end).hash end