method

gem_dependency

Importance_0
v2_2_9 - Show latest stable - 0 notes - Class: DependencyCommand
gem_dependency(args, version, prerelease) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/commands/dependency_command.rb, line 75
  def gem_dependency args, version, prerelease # :nodoc:
    args << '' if args.empty?

    pattern = if args.length == 1 and args.first =~ /\A\/(.*)\/(i)?\z/ then
                flags = $2 ? Regexp::IGNORECASE : nil
                Regexp.new $1, flags
              else
                /\A#{Regexp.union(*args)}/
              end

    dependency = Gem::Deprecate.skip_during {
      Gem::Dependency.new pattern, version
    }

    dependency.prerelease = prerelease

    dependency
  end
Register or log in to add new notes.