Skip to content

Instantly share code, notes, and snippets.

@gabebw
Created June 16, 2014 18:57
Show Gist options
  • Select an option

  • Save gabebw/771495573fdfd34835ee to your computer and use it in GitHub Desktop.

Select an option

Save gabebw/771495573fdfd34835ee to your computer and use it in GitHub Desktop.
Punctuation in Ruby
class Punctuation
def _?(*args)
yield 5
end
end
punctuation = Punctuation.new
# 8: . _ ? ( & : ! )
puts punctuation._?(&:!)
@calebhearth

Copy link
Copy Markdown

return self and chain calls indefinitely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment