Sha256: 11b894cefb5e99f41091939999463842b2279d30088ffc2d46328505aa9aeb86

Contents?: true

Size: 379 Bytes

Versions: 7

Compression:

Stored size: 379 Bytes

Contents

module Semmy
  module Gemspec
    extend self

    class NotFound < Error; end

    def gem_name
      specification.name
    end

    def homepage
      specification.homepage
    end

    def path
      Dir.glob('*.gemspec').first ||
        fail(NotFound, 'Gemspec not found.')
    end

    private

    def specification
      Gem::Specification.load(path)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
semmy-1.2.0 lib/semmy/gemspec.rb
semmy-1.1.0 lib/semmy/gemspec.rb
semmy-1.0.2 lib/semmy/gemspec.rb
semmy-1.0.1 lib/semmy/gemspec.rb
semmy-1.0.0 lib/semmy/gemspec.rb
semmy-0.4.0 lib/semmy/gemspec.rb
semmy-0.3.0 lib/semmy/gemspec.rb