Method: Railstar::CodeList#search_file
- Defined in:
- lib/code_holder.rb
#search_file(name, code_dir) ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/code_holder.rb', line 71 def search_file(name, code_dir) files = [ File.join(code_dir, "#{name}.csv") ] files.each do |file| return file if File.exist?(file) end raise UndefinedCode, "not found #{files}" end |