Define Ruby methods and variables with space in name
add these links to current user profile (link1, link2)
#...
photo.mark as liked by the current user
Want to be able to write this in ruby?
Ruby allows you to use non-breaking space ( ) in method's name. As well as any (almost) valid unicode symbol, like: "пиво = 42".
Using this trick, you can take ruby's DSL to a whole new level.
Courtesy of http://www.rubyinside.com/the-split-is-not-enough-whitespace-shenigans-for-rubyists-5980.html
P.S. Happy debugging! :D
Written by Bohdan Schepansky
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#