Created
September 18, 2010 08:53
-
-
Save jagtesh/585507 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
#!/usr/bin/env ruby | |
# DSL for eye-candy | |
MadCoder = "Jag" | |
def is(res) | |
puts res | |
end | |
def like_really? | |
true | |
end | |
def un(outcome) | |
not outcome | |
end | |
def a(who) | |
if block_given? | |
yield who | |
end | |
end | |
def blogging_on(where, likely_outcome) | |
if where == :posterous then likely_outcome else un likely_outcome end | |
end | |
# The pseudo-main() | |
is a(MadCoder) { blogging_on :posterous, like_really? } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment