Method: DataPaths::Finders#each_data_path
- Defined in:
- lib/data_paths/finders.rb
#each_data_path(path) {|potential_path| ... } ⇒ Enumerator
Passes all existing data paths for the specified path, within the data directories, to the given block.
24 25 26 27 28 29 30 31 32 |
# File 'lib/data_paths/finders.rb', line 24 def each_data_path(path) return enum_for(:each_data_path,path) unless block_given? DataPaths.paths.each do |dir| full_path = File.join(dir,path) yield(full_path) if File.exists?(full_path) end end |