Created
July 19, 2015 21:10
-
-
Save hugoabonizio/0504fa670608c5a68138 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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