Quakespotter.app/lib/ruby-processing/exporters/base_exporter.rb
def extract_libraries(source)
      libs = []
      code = source.dup
      loop do
        matchdata = code.match(/^[^#]*load_librar(y|ies)\s+(.+)\n/)
        break unless matchdata
        candidates = matchdata[2].gsub(/[:"'\s]/, '').split(/,/)
        candidates.each do |cand|
          @opengl = true if cand.match(/opengl/i)
          local_path = "#{local_dir}/library/#{cand}"
          rp5_path = "#{RP5_ROOT}/library/#{cand}"
          libs << rp5_path if File.exists?(rp5_path)
          libs << local_path if File.exists?(local_path)
        end
        code = matchdata.post_match
      end
      libs
    end
# Searches the source for any libraries that have been loaded.
Searches the source for any libraries that have been loaded.
Searches the source for any libraries that have been loaded .
def extract_libraries(source)
      libs = []
      code = source.dup
      loop do
        matchdata = code.match(/^[^#]*load_librar(y|ies)\s+(.+)\n/)
        break unless matchdata
        candidates = matchdata[2].gsub(/[:"'\s]/, '').split(/,/)
        candidates.each do |cand|
          @opengl = true if cand.match(/opengl/i)
          local_path = "#{local_dir}/library/#{cand}"
          rp5_path = "#{RP5_ROOT}/library/#{cand}"
          libs << rp5_path if File.exists?(rp5_path)
          libs << local_path if File.exists?(local_path)
        end
        code = matchdata.post_match
      end
      libs
    end
def extract_libraries ( source ) libs = [ ] code = source . dup loop do matchdata = code . match ( / ^[^#]*load_librar(y|ies) \s +(.+) \n / ) break unless matchdata candidates = matchdata [ 2 ] . gsub ( / [:"' \s ] / , '' ) . split ( / , / ) candidates . each do | cand | @opengl = true if cand . match ( / opengl /i ) local_path = "#{local_dir}/library/#{cand}" rp5_path = "#{RP5_ROOT}/library/#{cand}" libs << rp5_path if File . exists? ( rp5_path ) libs << local_path if File . exists? ( local_path ) end code = matchdata . post_match end libs end
Searches the source for any libraries that have been loaded.
Searches the source for any libraries that have been loaded .
source