Module: Institutions::Parents
- Included in:
- Institution
- Defined in:
- lib/institutions/institution/parents.rb
Overview
:no_doc
Instance Attribute Summary collapse
-
#parent_code ⇒ Object
Parents attributes.
Instance Method Summary collapse
-
#merge_parent(parent = {}) ⇒ Object
Merges the given parent into the Institution.
Instance Attribute Details
#parent_code ⇒ Object
Parents attributes
4 5 6 |
# File 'lib/institutions/institution/parents.rb', line 4 def parent_code @parent_code end |
Instance Method Details
#merge_parent(parent = {}) ⇒ Object
Merges the given parent into the Institution. Assumes the parent has a to_hash method
14 15 16 17 |
# File 'lib/institutions/institution/parents.rb', line 14 def merge_parent(parent={}) # Use the parent as the base and merge in the current institution merge(deep_merge(parent.to_hash, to_hash)) end |