Top Level Namespace

Defined Under Namespace

Modules: Net

Instance Method Summary collapse

Instance Method Details

#get_commandObject


3642
3643
3644
3645
3646
3647
3648
3649
# File 'lib/net/imap.rb', line 3642

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

#get_passwordObject


3633
3634
3635
3636
3637
3638
3639
3640
# File 'lib/net/imap.rb', line 3633

def get_password
  print "password: "
  begin
    return _noecho(&:gets).chomp
  ensure
    puts
  end
end

#usageObject


3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
# File 'lib/net/imap.rb', line 3603

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

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