Module: Draper::Delegation

Included in:
CollectionDecorator, Decorator
Defined in:
lib/draper/delegation.rb

Instance Method Summary collapse

Instance Method Details

#delegate(*methods, options = {}) ⇒ void

This method returns an undefined value.

Overrides Module.delegate to make :object the default delegation target.



8
9
10
11
# File 'lib/draper/delegation.rb', line 8

def delegate(*methods)
  options = methods.extract_options!
  super(*methods, **options.reverse_merge(to: :object))
end