Flockingbird/roost

View on GitHub
lib/aggregate_equality.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

##
# Allows aggregates and aggregate-alikes (like decorators) to match
# the objects
module AggregateEquality
  def ==(other)
    return false if id.nil?

    id == other.id
  end
end