Created
June 18, 2014 12:52
-
-
Save jdibiccari/e06ad23fd5dc5fc28d89 to your computer and use it in GitHub Desktop.
blog_post_6
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
#Example with one route and a view | |
#To install: gem install camping | |
#To run file: camping camping_example.rb | |
Camping.goes :App | |
module App::Controllers | |
class Index | |
def get | |
render :motto | |
end | |
end | |
end | |
module App::Views | |
def layout | |
html do | |
head do | |
title {"The Best State"} | |
end | |
body { self << yield } | |
end | |
end | |
def motto | |
p "Live free or die!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment