Module: Representable::ClassInclusions
- Defined in:
- lib/representable.rb
Instance Method Summary collapse
- #included(base) ⇒ Object
- 
  
    
      #inherited(base)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    DISCUSS: this could be in Decorator? but then we couldn’t do B < A(include X) for non-decorators, right?. 
Instance Method Details
#included(base) ⇒ Object
| 77 78 79 80 | # File 'lib/representable.rb', line 77 def included(base) super base.inherit_module!(self) end | 
#inherited(base) ⇒ Object
DISCUSS: this could be in Decorator? but then we couldn’t do B < A(include X) for non-decorators, right?
| 82 83 84 85 | # File 'lib/representable.rb', line 82 def inherited(base) # DISCUSS: this could be in Decorator? but then we couldn't do B < A(include X) for non-decorators, right? super base.representable_attrs.inherit!(representable_attrs) # this should be inherit_class! end |