Skip to content

Instantly share code, notes, and snippets.

@sugamasao
Created September 28, 2009 02:41
Show Gist options
  • Save sugamasao/195092 to your computer and use it in GitHub Desktop.
Save sugamasao/195092 to your computer and use it in GitHub Desktop.
# sinatra ファイルの分割 via http://www.sinatrarb.com/book.html#splitting_into_multiple_files
##############################
# main.rb
##############################
require 'rubygems'
require 'sinatra'
get '/' do
"hello world"
end
load 'controller/hogeController.rb' # ここでロードしてあげればおk
##############################
# controller/hogeController.rb
##############################
get '/hoge' do
"hoge"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment