Skip to content

Instantly share code, notes, and snippets.

@kastner
Created November 17, 2008 23:11
Show Gist options
  • Select an option

  • Save kastner/25951 to your computer and use it in GitHub Desktop.

Select an option

Save kastner/25951 to your computer and use it in GitHub Desktop.
require 'camping'
Camping.goes :Blog
module Blog::Controllers
class Index < R '/'
def get
render :index
end
end
end
module Blog::Views
def layout
html do
body do
self << yield
end
end
end
def index
h1 "Hi"
end
end
require 'blog'
run Rack::Adapter::Camping.new(Blog)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment