HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/gems/ruby-2.5.9@global/gems/gem-wrappers-1.4.0/lib/gem-wrappers/specification.rb
module GemWrappers
  module Specification
    def self.installed_gems
      if Gem::VERSION > '1.8' then
        Gem::Specification.to_a
      else
        Gem.source_index.map{|name,spec| spec}
      end
    end

    def self.find(name = "gem-wrappers")
      @gem_wrappers_spec ||= installed_gems.find{|spec| spec.name == name }
    end

    def self.version
      find ? find.version.to_s : nil
    end
  end
end