Module: JetSet::Identity

Defined in:
lib/jet_set/mixin/identity.rb

Overview

Identity decorator. Adds identifier to pure Ruby objects.

Instance Method Summary collapse

Instance Method Details

#==(object) ⇒ Object

Compares the object with another object using their types and IDs.



5
6
7
# File 'lib/jet_set/mixin/identity.rb', line 5

def ==(object)
  self.class == object.class && @id == object.id
end

#idObject

Object identifier



10
11
12
# File 'lib/jet_set/mixin/identity.rb', line 10

def id
  @id
end