Module: Representable::ClassMethods

Defined in:
lib/representable.rb

Instance Method Summary collapse

Instance Method Details

#inherit_module!(parent) ⇒ Object

Gets overridden by Decorator as inheriting representers via include in Decorator means a bit more work (manifesting).


100
101
102
# File 'lib/representable.rb', line 100

def inherit_module!(parent)
  representable_attrs.inherit!(parent.representable_attrs) # Module just inherits.
end

#prepare(represented) ⇒ Object


104
105
106
# File 'lib/representable.rb', line 104

def prepare(represented)
  represented.extend(self)
end