Module: Representable::ClassInclusions

Defined in:
lib/representable.rb

Instance Method Summary collapse

Instance Method Details

#included(base) ⇒ Object



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

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?



70
71
72
73
# File 'lib/representable.rb', line 70

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