Module: Perry::Associations::Common::ClassMethods
- Defined in:
- lib/perry/associations/common.rb
Instance Method Summary collapse
- #base_class_name(klass) ⇒ Object
- 
  
    
      #resolve_leaf_klass(klass)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    TRP: This will return the most recent extension of klass or klass if it is a leaf node in the hierarchy. 
Instance Method Details
#base_class_name(klass) ⇒ Object
| 6 7 8 | # File 'lib/perry/associations/common.rb', line 6 def base_class_name(klass) klass.to_s.split("::").last end | 
#resolve_leaf_klass(klass) ⇒ Object
TRP: This will return the most recent extension of klass or klass if it is a leaf node in the hierarchy
| 11 12 13 | # File 'lib/perry/associations/common.rb', line 11 def resolve_leaf_klass(klass) extension_map[klass].empty? ? klass : resolve_leaf_klass(extension_map[klass].last) end |