Top Level Namespace

Defined Under Namespace

Modules: EventMachine, Net

Instance Method Summary collapse

Instance Method Details

#get_commandObject


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

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

#get_passwordObject


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

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

#usageObject


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

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