def mailer_instance_variables(mailer)
      internal_vars = [:@_routes, :@_action_has_layout, :@_message, :@_prefixes, :@_lookup_context, :@_action_name, :@_response_body]
      vars = mailer.instance_variables - internal_vars
      opts = {}
      vars.each {|v| opts[v.slice(1..-1).to_sym] = mailer.instance_variable_get(v)}
      opts
    end
def mailer_instance_variables(mailer)
      internal_vars = [:@_routes, :@_action_has_layout, :@_message, :@_prefixes, :@_lookup_context, :@_action_name, :@_response_body]
      vars = mailer.instance_variables - internal_vars
      opts = {}
      vars.each {|v| opts[v.slice(1..-1).to_sym] = mailer.instance_variable_get(v)}
      opts
    end
Private: extracts the instance variables from the mailer object.

 mailer - The ActionMailer::Base object.

 Returns: a Hash with all the instance variables instantiated.