Top Level Namespace

Instance Method Summary collapse

Instance Method Details

#get_commandObject



3498
3499
3500
3501
3502
3503
3504
3505
# File 'lib/net/imap.rb', line 3498

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

#get_passwordObject



3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
# File 'lib/net/imap.rb', line 3487

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

#usageObject



3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
# File 'lib/net/imap.rb', line 3475

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