Module: Representable::ClassInclusions

Defined in:
lib/representable.rb

Instance Method Summary collapse

Instance Method Details

#included(base) ⇒ Object



61
62
63
64
# File 'lib/representable.rb', line 61

def included(base)
  super
  base.representable_attrs.inherit(representable_attrs)
end

#inherited(base) ⇒ Object

DISCUSS: this could be in Decorator? but then we couldn’t do B < A(include X) for non-decorators, right?



66
67
68
69
# File 'lib/representable.rb', line 66

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)
end