This file contains 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
# String#to_proc | |
# this can be used to evaluate a string to a proc. | |
class String | |
def to_proc | |
eval "Proc.new do\n#{self}\nend" | |
end | |
end | |
# demo |
This file contains 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
require 'sinatra' | |
require 'sculpt' | |
require 'sass' | |
t = template_doc do |includes, content| | |
head do | |
render includes | |
css "main.css" | |
title "Sculpt" | |
end |