static public Method

Router.compiled_statement

There's no documentation for this item.

Source Code

# File merb/router.rb, line 28
def compiled_statement
  @@compiled_statement = "lambda { |request, params|\n"
  @@compiled_statement << "  cached_path = request.path\n  cached_method = request.method.to_s\n  "
  # @@compiled_statement << "  puts cached_path.inspect; puts cached_method.inspect\n"
  @@routes.each_with_index { |route, i| @@compiled_statement << route.compile(i == 0) }
  @@compiled_statement << "  else\n    [nil, {}]\n"
  @@compiled_statement << "  end\n"
  @@compiled_statement << "}"
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.