Skip to content

Instantly share code, notes, and snippets.

@hugoabonizio
Created July 19, 2015 21:10
Show Gist options
  • Save hugoabonizio/0504fa670608c5a68138 to your computer and use it in GitHub Desktop.
Save hugoabonizio/0504fa670608c5a68138 to your computer and use it in GitHub Desktop.
require "banjo"
require "http"
class WelcomeController < Banjo::Controller::Base
def index
end
def test
render text: "aaa"
end
def outro
render html: "precedence"
end
end
module Banjo
VIEWS_PATH = "#{__DIR__}/views/"
end
module Banjo::Router
get "/", "welcome#index"
get "/outro", "welcome#outro"
get "/test", "welcome#test"
end
controller = $routes["GET"]["/outro"].handler.call Banjo::Context.new
puts controller.output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment