Sha256: 1fd465c436ebbf0250bab8fb9b76f1d992f560722a0a36674ac250d4c0f14454

Contents?: true

Size: 407 Bytes

Versions: 3

Compression:

Stored size: 407 Bytes

Contents

module Gem
  class Specification

    # Return full path of requireable file given relative path.
    def find_requireable_file(file)
      root = full_gem_path

      require_paths.each do |lib|
        base = File.join(root, lib, file)
        Gem.suffixes.each do |suf|
          path = "#{base}#{suf}"
          return path if File.file? path
        end
      end

      return nil
    end

  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 lib/standard/facets/gem/specification/find_requireable_file.rb
facets-3.1.0 lib/standard/facets/gem/specification/find_requireable_file.rb
facets-3.0.0 lib/standard/facets/gem/specification/find_requireable_file.rb