Module: Persistence::Object::Complex::Index::AttributeIndex::AttributeIndexInterface
- Includes:
- CascadingConfiguration::Setting, Index
- Included in:
- Persistence::Object::Complex::Index::AttributeIndex
- Defined in:
- lib/persistence/object/complex/index/attribute_index/attribute_index_interface.rb
Overview
Interface for index on object attributes, which calls attribute method to retrieve value for persistence,
and which will load value from persistence port back into same attribute through setter method.
Instance Attribute Summary
Attributes included from Index
Instance Method Summary collapse
-
#attribute_name ⇒ Symbol, String
Name of attribute index indexes.
- #attribute_name=(attribute_name) ⇒ Object
-
#index_object(object) ⇒ Object
index_object #.
Methods included from Index
#adapter_index, #atomic_cursor, #count, #cursor, #delete_keys_for_object!, #delete_keys_for_object_id!, #disable, #each, #get_object_id, #index_existing_objects, #index_object_id, #init_sorting_procs, #initialize, #initialize_for_bucket, #name, #permits_duplicates?, #persisted?, #sorting_proc_for_sort_name
Instance Method Details
#attribute_name ⇒ Symbol, String
Returns Name of attribute index indexes.
|
# File 'lib/persistence/object/complex/index/attribute_index/attribute_index_interface.rb', line 16
|
#attribute_name=(attribute_name) ⇒ Object
27 |
# File 'lib/persistence/object/complex/index/attribute_index/attribute_index_interface.rb', line 27 attr_setting :attribute_name |
#index_object(object) ⇒ Object
index_object #
33 34 35 36 37 38 39 40 41 |
# File 'lib/persistence/object/complex/index/attribute_index/attribute_index_interface.rb', line 33 def index_object( object ) # get attribute value attribute_value = object.__send__( attribute_name ) # store in super - key/value index return super( object, attribute_value ) end |