Method: Interscript.locate
- Defined in:
- lib/interscript.rb
.locate(map_name) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/interscript.rb', line 19 def locate map_name map_name = map_aliases[map_name] if map_aliases.include? map_name load_path.each do |i| # iml is an extension for a library, imp for a map ["iml", "imp"].each do |ext| f = File.("#{map_name}.#{ext}", i) return f if File.exist?(f) end end raise MapNotFoundError, "Couldn't locate #{map_name}" end |