class Perpetuity::Reference
Attributes
id[R]
klass[R]
Public Class Methods
new(klass, id)
click to toggle source
# File lib/perpetuity/reference.rb, line 4 def initialize klass, id @klass = klass @id = id end
Public Instance Methods
==(other)
click to toggle source
# File lib/perpetuity/reference.rb, line 9 def == other if other.is_a? self.class klass == other.klass && id == other.id else other.is_a?(klass) && id == other.instance_variable_get(:@id) end end
eql?(other)
click to toggle source
# File lib/perpetuity/reference.rb, line 17 def eql? other other.is_a?(self.class) && self == other end