module Gem::GemspecHelpers - Documentation for Ruby 4.0
Description: module Gem::GemspecHelpers: Mixin methods for commands that work with gemspecs.
Keywords: ruby,module,Gem::GemspecHelpers

🔍

No recent searches

# module Gem::GemspecHelpers

Mixin methods for commands that work with gemspecs.

### Public Instance Methods

find_gemspec (glob = "*.gemspec")
Source

    # File lib/rubygems/gemspec_helpers.rb, line 9
    def find_gemspec(glob = "*.gemspec")
      gemspecs = Dir.glob(glob).sort

      if gemspecs.size > 1
        alert_error "Multiple gemspecs found: #{gemspecs}, please specify one"
        terminate_interaction(1)
      end

      gemspecs.first
    end