Sha256: 90d28bfee2f1a6219b8d86fed78cbb6f16356c6beebac813c0283b0e5ee9a5c0

Contents?: true

Size: 481 Bytes

Versions: 1

Compression:

Stored size: 481 Bytes

Contents

# frozen_string_literal: true
require 'yaml'

class PEdump
  def self.ordlookup(dll, ord, make_name: false)
    dll = dll.downcase
    @ordlookup ||= {}
    @ordlookup[dll] ||= 
      begin
        yml_fname = File.expand_path(File.dirname(__FILE__) + "/../../data/ordlookup/" + dll + ".yml")
        if File.exist?(yml_fname)
          YAML.load_file(yml_fname)
        else
          {}
        end
      end
    @ordlookup[dll][ord] || (make_name ? "ord#{ord}" : nil)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pedump-0.6.9 lib/pedump/ordlookup.rb