Class: Toy::Identity::AbstractKeyFactory
- Inherits:
-
Object
- Object
- Toy::Identity::AbstractKeyFactory
show all
- Defined in:
- lib/toy/identity/abstract_key_factory.rb
Instance Method Summary
collapse
Instance Method Details
#eql?(other) ⇒ Boolean
Also known as:
==
16
17
18
|
# File 'lib/toy/identity/abstract_key_factory.rb', line 16
def eql?(other)
self.class == other.class && key_type == other.key_type
end
|
4
5
6
|
# File 'lib/toy/identity/abstract_key_factory.rb', line 4
def key_type
raise NotImplementedError, "#{self.class.name}.store_type isn't implemented."
end
|
#next_key(object) ⇒ Object
8
9
10
|
# File 'lib/toy/identity/abstract_key_factory.rb', line 8
def next_key(object)
raise NotImplementedError, "#{self.class.name}#next_key isn't implemented."
end
|
#to_key(object) ⇒ Object
12
13
14
|
# File 'lib/toy/identity/abstract_key_factory.rb', line 12
def to_key(object)
[object.id] if object.persisted?
end
|