private Method

Sandbox.define_run_method(script_path)

There's no documentation for this item.

Source Code

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

  source = "def run\n\#{script}\nold_request_count = request_count\nreset!\nself.request_count = old_request_count\nend\n"

  instance_eval source, script_path, 1
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.