Sha256: ca54eeaa89bc6d827e78baf2a39753f722d527efb74cfa64e5d0d9ddc970c606

Contents?: true

Size: 261 Bytes

Versions: 30

Compression:

Stored size: 261 Bytes

Contents

module RD
  module SearchFile
    def search_file(base, include_path, suffixes)
      include_path.each do |dir|
	suffixes.each do |suffix|
	  file = dir + "/" + base + "." + suffix
	  return file if File.exist? file
	end
      end
      nil
    end
  end
end

Version data entries

30 entries across 29 versions & 4 rubygems

Version Path
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/rdtool-0.6.38/lib/rd/search-file.rb
tdiary-5.0.8 vendor/bundle/gems/rdtool-0.6.38/lib/rd/search-file.rb
tdiary-5.0.5 vendor/bundle/gems/rdtool-0.6.38/lib/rd/search-file.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/rdtool-0.6.38/lib/rd/search-file.rb
tdiary-5.0.4 vendor/bundle/gems/rdtool-0.6.38/lib/rd/search-file.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/rdtool-0.6.38/lib/rd/search-file.rb
nishidayuya-rd2odt-0.1.1.20090701.01 lib/rd2odt/rdtool/rd/search-file.rb
nishidayuya-rd2odt-0.1.1.20090704.01 lib/rd2odt/rdtool/rd/search-file.rb
nishidayuya-rd2odt-0.1.1.20090706.01 lib/rd2odt/rdtool/rd/search-file.rb
nishidayuya-rd2odt-0.1.1 lib/rd2odt/rdtool/rd/search-file.rb
tdiary-3.2.2.20130518 vendor/rdtool-0.6.38/lib/rd/search-file.rb
tdiary-3.2.2.20130508 vendor/rdtool-0.6.38/lib/rd/search-file.rb
tdiary-3.2.2.20130507 vendor/rdtool-0.6.38/lib/rd/search-file.rb
rdtool-0.6.38 lib/rd/search-file.rb
rdtool-0.6.37 lib/rd/search-file.rb
rdtool-0.6.36 lib/rd/search-file.rb
rdtool-0.6.35 lib/rd/search-file.rb
rdtool-0.6.34 lib/rd/search-file.rb
rdtool-0.6.33 lib/rd/search-file.rb
rdtool-0.6.32 lib/rd/search-file.rb