module Draper::AutomaticDelegation::ClassMethods
Public Instance Methods
Source
# File lib/draper/automatic_delegation.rb, line 60 def before_remove_const end
@private Avoids reloading the model class when ActiveSupport clears autoloaded dependencies in development mode.
Source
# File lib/draper/automatic_delegation.rb, line 53 def delegatable?(method) object_class? && object_class.respond_to?(method) end
@private
Source
# File lib/draper/automatic_delegation.rb, line 40 def method_missing(method, *args, &block) return super unless delegatable?(method) object_class.send(method, *args, &block) end
Calls superclass method
Source
# File lib/draper/automatic_delegation.rb, line 48 def respond_to_missing?(method, include_private = false) super || delegatable?(method) end
Checks if the decorator responds to a class method, or is able to proxy it to the source class.
Calls superclass method