module Occi::Helpers::Comparators::Entity

Public Instance Methods

==(obj) click to toggle source
# File lib/occi/helpers/comparators/entity.rb, line 6
def ==(obj)
  return false unless obj && obj.respond_to?(:kind) && obj.respond_to?(:attributes)
  (self.kind == obj.kind) && (self.attributes['occi.core.id'] == obj.attributes['occi.core.id'])
end
eql?(obj) click to toggle source
# File lib/occi/helpers/comparators/entity.rb, line 11
def eql?(obj)
  self == obj
end
hash() click to toggle source
# File lib/occi/helpers/comparators/entity.rb, line 15
def hash
  [self.kind, self.attributes['occi.core.id']].hash
end