Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (29 sloc) 900 Bytes
# gem install markaby
require 'rubygems'
require 'markaby'
# Indent with two spaces, this is optional
Markaby::Builder.set(:indent, 2)
markaby = Markaby::Builder.new
markaby.html do
head do
title "Markaby Cheat Sheet"
meta :name => "keywords", :content => "markaby, cheat, sheet, ruby"
style :type => "text/css" do
%[
body { font: 11px/120% Verdana, sans-serif }
]
end
end
body do
div.content do
p "Paragraph in a div with a class of content"
p.hasclass "Paragraph with a class of hasclass in a div with a class of content"
p.third! "Paragraph with an ID of third in a div with a class of content"
end
ul {
li "Markaby is just Ruby"
li "So Curly Brace code blocks work too"
}
end
end
markaby.to_s
Jump to Line
Something went wrong with that request. Please try again.