Top Level Namespace

Defined Under Namespace

Modules: Net

Instance Method Summary collapse

Instance Method Details

#get_commandObject



3250
3251
3252
3253
3254
3255
3256
3257
# File 'lib/net/imap.rb', line 3250

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

#get_passwordObject



3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
# File 'lib/net/imap.rb', line 3239

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

#usageObject



3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
# File 'lib/net/imap.rb', line 3227

def usage
  $stderr.print "usage: \#{$0} [options] <host>\n\n--help                        print this message\n--port=PORT                   specifies port\n--user=USER                   specifies user\n--auth=AUTH                   specifies auth type\n--ssl                         use ssl\n"
end