Skip to content

Instantly share code, notes, and snippets.

@jagtesh
Created September 18, 2010 08:53
Show Gist options
  • Save jagtesh/585507 to your computer and use it in GitHub Desktop.
Save jagtesh/585507 to your computer and use it in GitHub Desktop.
#!/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