Created
August 2, 2013 18:54
-
-
Save geeksam/6142405 to your computer and use it in GitHub Desktop.
AXE brogramming
This file contains hidden or 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
class Brogrammer | |
def ponder_life | |
self.if(you == understand.this) { | |
get.a.girlfriend; | |
} | |
end | |
def if(predicate) | |
yield if predicate | |
end | |
private | |
def you | |
:you | |
end | |
def understand | |
Object.new.tap { |obj| def obj.this; :you; end } | |
end | |
def get | |
Object.new.tap { |obj| def obj.method_missing(*); self; end } | |
end | |
end | |
dhh = Brogrammer.new | |
p dhh.ponder_life |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment