Module: RbDot
- Defined in:
- lib/rbdot.rb
Constant Summary collapse
- EXTENSIONS =
['.rb', '.so', '.o', '.dll']
Class Method Summary collapse
Class Method Details
.find_file(name) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/rbdot.rb', line 23 def find_file name case File.extname(name).downcase when *EXTENSIONS return name else EXTENSIONS.each do |ext| fn = name + ext $:.each do |path| if File.exists?(File.join(path, fn)) return fn end end end end nil end |