chained bang(!) methods
text = " aSdF \n"
text.tap(&:chomp!).tap(&:strip!).tap(&:downcase!)
p text # => 'asdf'
Written by Shou Ya
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#