module ActiveFedora::Common
def <=>(other)
def <=>(other) if other.is_a?(self.class) to_key <=> other.to_key else super end end
def ==(other)
Note also that destroying a record preserves its ID in the model instance, so deleted
other record is the receiver itself.
Note that new records are different from any other record by definition, unless the
is of the same type and +self+ has an ID and it is equal to +comparison_object.id+.
Returns true if +comparison_object+ is the same exact object, or +comparison_object+
def ==(other) other.equal?(self) || (other.instance_of?(self.class) && !id.nil? && other.id == id) end
def freeze
def freeze @frozen = true end
def frozen?
def frozen? @frozen.present? end
def ldp_source
def ldp_source @ldp_source end
def readonly!
def readonly! @readonly = true end
def readonly?
Returns +true+ if the record is read only. Records loaded through joins with piggy-back
def readonly? @readonly end