Skip to content

Instantly share code, notes, and snippets.

@psylone
Created August 1, 2020 01:08
Show Gist options
  • Save psylone/e9f124124b276f54b36cbbe97bad0012 to your computer and use it in GitHub Desktop.
Save psylone/e9f124124b276f54b36cbbe97bad0012 to your computer and use it in GitHub Desktop.
Splitting Roda routes between files
require_relative 'green'
class App < Roda
route do |r|
r.root do
raise
'root'
end
r.on 'green' do
r.run Green
end
end
end
class Green < Roda
route do |r|
r.is do
'green root'
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment