Sha256: 2e56b0f376dbd1540593ef9b11274221f1022e757965471afa723a007a3cc9d8

Contents?: true

Size: 418 Bytes

Versions: 1

Compression:

Stored size: 418 Bytes

Contents

module NlmtWrappers
  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 = "nlmt-wrappers")
      @gem_wrappers_spec ||= installed_gems.find{|spec| spec.name == name }
    end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nlmt-wrappers-0.0.1 lib/nlmt-wrappers/specification.rb