ruby_doc_updates-20110516-1013_vbatts.patch

Vincent Batts, 05/17/2011 05:22 AM

Download (2.74 KB)

View differences:

lib/net/pop.rb
196 196
  #
197 197
  class POP3 < Protocol
198 198

  
199
    # svn revision of this library
199 200
    Revision = %q$Revision$.split[1]
200 201

  
201 202
    #
202 203
    # Class Parameters
203 204
    #
204 205

  
206
    # returns the port for POP3
205 207
    def POP3.default_port
206 208
      default_pop3_port()
207 209
    end
......
333 335
      @ssl_params = create_ssl_params(*args)
334 336
    end
335 337

  
338
    # Constructs proper parameters from arguments
336 339
    def POP3.create_ssl_params(verify_or_params = {}, certs = nil)
337 340
      begin
338 341
        params = verify_or_params.to_hash
......
355 358
      @ssl_params = nil
356 359
    end
357 360

  
361
    # returns the SSL Parameters
362
    #
363
    # see also POP3.enable_ssl
358 364
    def POP3.ssl_params
359 365
      return @ssl_params
360 366
    end
361 367

  
368
    # returns +true+ if POP3.ssl_params is set
362 369
    def POP3.use_ssl?
363 370
      return !@ssl_params.nil?
364 371
    end
365 372

  
373
    # returns whether verify_mode is enable from POP3.ssl_params
366 374
    def POP3.verify
367 375
      return @ssl_params[:verify_mode]
368 376
    end
369 377

  
378
    # returns the :ca_file or :ca_path from POP3.ssh_params
370 379
    def POP3.certs
371 380
      return @ssl_params[:ca_file] || @ssl_params[:ca_path]
372 381
    end
......
452 461
      end
453 462
    end
454 463

  
464
    # Disable SSL for all new instances.
455 465
    def disable_ssl
456 466
      @ssl_params = nil
457 467
    end
......
530 540
      end
531 541
    end
532 542

  
543
    # internal method for Net::POP3.start
533 544
    def do_start(account, password)
534 545
      s = timeout(@open_timeout) { TCPSocket.open(@address, port) }
535 546
      if use_ssl?
......
565 576
    end
566 577
    private :do_start
567 578

  
579
    # Does nothing
568 580
    def on_connect
569 581
    end
570 582
    private :on_connect
......
575 587
      do_finish
576 588
    end
577 589

  
590
    # nil's out the:
591
    # - mails
592
    # - number counter for mails
593
    # - number counter for bytes
594
    # - quits the current command, if any
578 595
    def do_finish
579 596
      @mails = nil
580 597
      @n_mails = nil
......
588 605
    end
589 606
    private :do_finish
590 607

  
608
    # Returns the current command.
609
    #
610
    # Raises IOError if there is no active socket
591 611
    def command
592 612
      raise IOError, 'POP session not opened yet' \
593 613
                                      if not @socket or @socket.closed?
......
687 707
      @mails.each {|m| m.uid = uidl[m.number] }
688 708
    end
689 709

  
710
    # deguging output for +msg+
690 711
    def logging(msg)
691 712
      @debug_output << msg + "\n" if @debug_output
692 713
    end
lib/net/telnet.rb
754 754
      line
755 755
    end
756 756

  
757
    # Closes the socket
757 758
    def close
758 759
      @sock.close
759 760
    end