method
find
v1_9_3_392 -
Show latest stable
-
0 notes -
Class: GemPathSearcher
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
find(glob)
public
Look in all the installed gems until a matching glob is found. Return the gemspec of the gem where it was found. If no match is found, return nil.
The gems are searched in alphabetical order, and in reverse version order.
For example:
find('log4r') # -> (log4r-1.1 spec) find('log4r.rb') # -> (log4r-1.1 spec) find('rake/rdoctask') # -> (rake-0.4.12 spec) find('foobarbaz') # -> nil
Matching paths can have various suffixes (‘.rb’, ‘.so’, and others), which may or may not already be attached to file. This method doesn’t care about the full filename that matches; only that there is a match.