Module: Cyrax::Extensions::HasDecorator::ClassMethods

Defined in:
lib/cyrax/extensions/has_decorator.rb

Instance Method Summary collapse

Instance Method Details

#decorator(klass) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/cyrax/extensions/has_decorator.rb', line 18

def decorator(klass)
  if klass.is_a?(String)
    ActiveSupport::Deprecation.warn "sending String in #decorator method is deprecated. send Class instead"
    klass = klass.constantize
  end
  self._decorator_class = klass
end