class Draper::HelperProxy

defined in your application.
Provides access to helper methods - both Rails built-in helpers, and those

def self.define_proxy(name)

def self.define_proxy(name)
  define_method name do |*args, &block|
    view_context.send(name, *args, &block)
  end
  ruby2_keywords name
end

def initialize(view_context)

Overloads:
  • initialize(view_context)
def initialize(view_context)
  @view_context = view_context
end

def method_missing(method, *args, &block)

Sends helper methods to the view context.
def method_missing(method, *args, &block)
fine_proxy method
*args, &block)

def respond_to_missing?(method, include_private = false)

proxy it to the view context.
Checks if the context responds to an instance method, or is able to
def respond_to_missing?(method, include_private = false)
  super || view_context.respond_to?(method)
end