Created
June 16, 2014 18:57
-
-
Save gabebw/771495573fdfd34835ee to your computer and use it in GitHub Desktop.
Punctuation in Ruby
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 Punctuation | |
| def _?(*args) | |
| yield 5 | |
| end | |
| end | |
| punctuation = Punctuation.new | |
| # 8: . _ ? ( & : ! ) | |
| puts punctuation._?(&:!) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
return self and chain calls indefinitely.