Module: GemWrappers::Specification

Defined in:
lib/gem-wrappers/specification.rb

Class Method Summary collapse

Class Method Details

.findObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/gem-wrappers/specification.rb', line 3

def self.find
  @gem_wrappers_spec ||=
    if Gem::Specification.respond_to?(:find_by_name)
      Gem::Specification.find_by_name("gem-wrappers")
    else
      Gem.source_index.find_name("gem-wrappers").last
    end
rescue Gem::LoadError
  nil
end

.versionObject



13
14
15
# File 'lib/gem-wrappers/specification.rb', line 13

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