Module: Persistence::Adapter::Abstract::PrimaryKey::Simple
- Included in:
- Mock::Bucket::BucketInterface
- Defined in:
- lib/persistence/adapter/abstract/primary_key/simple.rb
Overview
Provides primary key with attribute name to including adapter class.
Instance Method Summary collapse
-
#primary_key_for_attribute_name(object, attribute_name) ⇒ Object
Returns a primary key for storage in adapter (self).
Instance Method Details
#primary_key_for_attribute_name(object, attribute_name) ⇒ Object
Returns a primary key for storage in adapter (self). Generated from object instance and attribute name.
Any further constraints are a function of the adapter's requirements, not of Persistence.
This implementation simply returns the attribute name.
23 24 25 26 27 |
# File 'lib/persistence/adapter/abstract/primary_key/simple.rb', line 23 def primary_key_for_attribute_name( object, attribute_name ) return attribute_name end |