Ruby Ranges
Use:
Range#cover?
instead of:
Range#include?
cover? uses logic where #include? requires creation of all data in Range
Written by Benjamin Roth
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#