-
-
Save copiousfreetime/5792ee728961d60b56e5 to your computer and use it in GitHub Desktop.
Roda App with sub applications
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
class A < ::Roda | |
def do_a_thing | |
# ... | |
end | |
route do |r| | |
r.get 'thing' do | |
do_a_thing | |
end | |
end | |
end |
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
class App < ::Roda | |
require './a' | |
require './b' | |
route do |r| | |
r.on 'a' do | |
r.run ::A | |
end | |
r.on 'b' do | |
r.run ::B | |
end | |
end | |
end |
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
class B < ::Roda | |
def do_b_stuff | |
# ... | |
end | |
route do |r| | |
r.get 'stuff' do | |
do_b_stuff | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment