Created
March 2, 2009 16:52
-
-
Save fabiokung/72852 to your computer and use it in GitHub Desktop.
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
def method_missing(name, *args) | |
puts "<#{name}>#{args[0]}" | |
yield if block_given? | |
puts "</#{name}>" | |
end | |
html do | |
body do | |
h1 "My internal DSL" | |
div do | |
span "HTML generation engine in 4 lines" | |
ul do | |
li "take a look at Markaby" | |
li "at least once" | |
li "for some more ideas" | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment