sstephenson/hike — pull request #31 by josh (2014-04-03 03:53:21+00:00)
Title: Split find/find_all apis

`Trail#find` was amended in 94d672741646bccde25f4ad772da0dcb2dace6df to take a block and return all matching results. Its okay, but it overloaded `find`. Really this should have a been a separate method.

This splits that behavior into `Trail#find_all`. And now that we are at least on 1.9.3, we can take more advantages of the enumerator api additions.

``` ruby
# always returns immediately with enumerator
trail.find_all("application.js")

# same as find(), just grab the first match
# enumerating is lazy, so its just as efficient
trail.find_all("application.js").first

# in Ruby 2.0 we can use lazy
trail.find_all("application.js").lazy.select { |path| path =~ /custom constraint/ }.first
```