Module: ROM::LDAP::Associations::SelfRef
- Included in:
- OneToMany
- Defined in:
- lib/rom/ldap/associations/self_ref.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
7 8 9 10 |
# File 'lib/rom/ldap/associations/self_ref.rb', line 7 def self.included(klass) super klass.memoize :join_keys, :source_attr, :target_attr end |
Instance Method Details
#join_keys ⇒ Hash
15 16 17 |
# File 'lib/rom/ldap/associations/self_ref.rb', line 15 def join_keys { source_attr => target_attr } end |
#source_attr ⇒ ROM::LDAP::Attribute
22 23 24 |
# File 'lib/rom/ldap/associations/self_ref.rb', line 22 def source_attr source[source_key] end |
#target_attr ⇒ ROM::LDAP::Attribute
29 30 31 |
# File 'lib/rom/ldap/associations/self_ref.rb', line 29 def target_attr target[target_key] end |