method

rubygems_target_version

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: UpdateCommand
rubygems_target_version() public

No documentation

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

Hide source
# File lib/rubygems/commands/update_command.rb, line 171
  def rubygems_target_version
    version = options[:system]
    update_latest = version == true

    if update_latest then
      version     = Gem::Version.new     Gem::VERSION
      requirement = Gem::Requirement.new ">= #{Gem::VERSION}"
    else
      version     = Gem::Version.new     version
      requirement = Gem::Requirement.new version
    end

    rubygems_update         = Gem::Specification.new
    rubygems_update.name    = 'rubygems-update'
    rubygems_update.version = version

    hig = {
      'rubygems-update' => rubygems_update
    }

    gems_to_update = which_to_update hig, options[:args], :system
    _, up_ver   = gems_to_update.first

    target = if update_latest then
               up_ver
             else
               version
             end

    return target, requirement
  end
Register or log in to add new notes.