Class: ActiveDecoratorWithDecorateAssociations::Decorator
- Inherits:
-
Object
- Object
- ActiveDecoratorWithDecorateAssociations::Decorator
- Includes:
- Singleton
- Defined in:
- lib/active_decorator_with_decorate_associations/decorator.rb
Instance Method Summary collapse
Instance Method Details
#decorate(owner, target) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/active_decorator_with_decorate_associations/decorator.rb', line 8 def decorate(owner, target) if owner.is_a?(ActiveDecoratorWithDecorateAssociations::Marker) ActiveDecorator::Decorator.instance.decorate(target) else target end end |