Created
October 10, 2012 16:25
-
-
Save jeremywrowe/3866699 to your computer and use it in GitHub Desktop.
tap-5
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
class Foo | |
class << self | |
def one(val) | |
tap { @one = val } | |
end | |
def two(val) | |
tap { @two = val } | |
end | |
def build | |
"#{@one}, #{@two}" | |
end | |
end | |
end | |
puts Foo.one("yeah").two("buddy").build # => yeah, buddy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment