Skip to content

Instantly share code, notes, and snippets.

@jeremywrowe
Created October 10, 2012 16:25
Show Gist options
  • Save jeremywrowe/3866699 to your computer and use it in GitHub Desktop.
Save jeremywrowe/3866699 to your computer and use it in GitHub Desktop.
tap-5
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