module Representable::ClassInclusions
Public Instance Methods
included(base)
click to toggle source
Calls superclass method
# File lib/representable.rb, line 93 def included(base) super base.inherit_module!(self) end
inherited(subclass)
click to toggle source
Calls superclass method
# File lib/representable.rb, line 98 def inherited(subclass) # DISCUSS: this could be in Decorator? but then we couldn't do B < A(include X) for non-decorators, right? super # FIXME: subclass.representable_attrs is ALWAYS empty at this point. subclass.representable_attrs.inherit!(representable_attrs) # this should be inherit_class! # DISCUSS: this could also just be: subclass.inheritable_attr :representable_attrs --> superclass.representable_attrs.clone end