Module: ExecutableHooks::Specification

Defined in:
lib/executable-hooks/specification.rb

Class Method Summary collapse

Class Method Details

.findObject



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

def self.find
  @executable_hooks_spec ||=
    if Gem::Specification.respond_to?(:find_by_name)
      Gem::Specification.find_by_name("executable-hooks", ">=0", ">=0.alpha")
    else
      Gem.source_index.find_name("executable-hooks").last
    end
rescue Gem::LoadError
  nil
end

.versionObject



13
14
15
# File 'lib/executable-hooks/specification.rb', line 13

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