Module: Plotline::Concerns::Family::ClassMethods
- Defined in:
- app/models/plotline/concerns/family.rb
Instance Method Summary collapse
Instance Method Details
#child_entries(child_entry_klass) ⇒ Object
20 21 22 23 |
# File 'app/models/plotline/concerns/family.rb', line 20 def child_entries(child_entry_klass) @child_entry ||= child_entry_klass.to_s.singularize.classify alias_method child_entry_klass, :children end |
#parent_entry(parent_entry_klass = nil) ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/models/plotline/concerns/family.rb', line 12 def parent_entry(parent_entry_klass = nil) if parent_entry_klass @parent_entry ||= parent_entry_klass.to_s.classify alias_method parent_entry_klass, :parent end @parent_entry end |