Created
May 12, 2009 16:18
-
-
Save mdeiters/110565 to your computer and use it in GitHub Desktop.
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
#TO RUN | |
# Install ruby | |
# from command line type gem install sinatra haml | |
# create this file and call it app.rb | |
# from command line type ruby app.rb | |
# open up browser to http://localhost:4567/haml | |
require 'rubygems' | |
require 'sinatra' | |
require 'haml' | |
get '/haml' do | |
@variable = "I can access this from haml" | |
haml :presentation #This treats everything under @@presentation in this file as a HAML file | |
end | |
__END__ | |
@@presentation | |
%html | |
%head Testing Haml | |
%body | |
%h1 HI | |
%p | |
here is some text | |
.example= @variable | |
#some_div here is a div where i set the id | |
%p | |
more info at | |
%a{:href => 'http://haml.hamptoncatlin.com/'} Haml Webpage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment