~ubuntu-branches/ubuntu/wily/tdiary/wily

« back to all changes in this revision

Viewing changes to vendor/rdtool-0.6.38/lib/rd/search-file.rb

  • Committer: Package Import Robot
  • Author(s): Hideki Yamane
  • Date: 2013-05-19 16:14:01 UTC
  • mfrom: (12.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130519161401-hf5oyr8g8a94fsew
Tags: 3.2.2-2
Upload to unstable 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
module RD
 
3
  module SearchFile
 
4
    def search_file(base, include_path, suffixes)
 
5
      include_path.each do |dir|
 
6
        suffixes.each do |suffix|
 
7
          file = dir + "/" + base + "." + suffix
 
8
          return file if File.exist? file
 
9
        end
 
10
      end
 
11
      nil
 
12
    end
 
13
  end
 
14
end