Top Level Namespace

Defined Under Namespace

Modules: Net

Instance Method Summary collapse

Instance Method Details

#get_commandObject


3289
3290
3291
3292
3293
3294
3295
3296
# File 'lib/net/imap.rb', line 3289

def get_command
  printf("%[email protected]%s> ", $user, $host)
  if line = gets
    return line.strip.split(/\s+/)
  else
    return nil
  end
end

#get_passwordObject


3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
# File 'lib/net/imap.rb', line 3278

def get_password
  print "password: "
  system("stty", "-echo")
  begin
    return gets.chop
  ensure
    system("stty", "echo")
    print "\n"
  end
end

#usageObject


3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
# File 'lib/net/imap.rb', line 3266

def usage
  $stderr.print <<EOF
usage: #{$0} [options] <host>

--help                        print this message
--port=PORT                   specifies port
--user=USER                   specifies user
--auth=AUTH                   specifies auth type
--ssl                         use ssl
EOF
end