class Gem::Commands::SigninCommand - Documentation for Ruby 4.0
Description: Documentation for the Gem::Commands::SigninCommand class
Keywords: ruby,class,Gem::Commands::SigninCommand

🔍

No recent searches

# class Gem::Commands::SigninCommand

### Public Class Methods

new ()
Source

    # File lib/rubygems/commands/signin_command.rb, line 9
    def initialize
      super "signin", "Sign in to any gemcutter-compatible host. "\
            "It defaults to https://rubygems.org"

      add_option("--host HOST", "Push to another gemcutter-compatible host") do |value, options|
        options[:host] = value
      end

      add_otp_option
    end

Calls superclass method `Gem::Command::new`

### Public Instance Methods

execute ()
Source

    # File lib/rubygems/commands/signin_command.rb, line 31
    def execute
      sign_in options[:host]
    end