Usefull ActiveSupport#inquiry method!
Maybe you gus already saw some code like:
Rails.env.production?
You can accomplish that syntax with any string object:
person = "heisenberg".inquiry
person.heisenberg? #=> true
person.pinkman? #=> false
Written by Rui Anderson
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#