Method: Interscript.locate
- Defined in:
- lib/interscript.rb
.locate(map_name) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/interscript.rb', line 12 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 |