Flowdock
method

define_run_method

Importance_0
v2.1.0 - Show latest stable - 0 notes - Class: ActionController::RequestProfiler::Sandbox
define_run_method(script_path) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/request_profiler.rb, line 42
        def define_run_method(script_path)
          script = File.read(script_path)

          source = "def run(profiling = false)\nif profiling\nRubyProf.resume do\n\#{script}\nend\nelse\n\#{script}\nend\n\nold_request_count = request_count\nreset!\nself.request_count = old_request_count\nend\n"

          instance_eval source, script_path, 1
        end
Register or log in to add new notes.