ruby_doc_updates-20110516-1013_vbatts.patch

Vincent Batts, 05/16/2011 11:15 PM

Download (2.59 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
......
530 539
      end
531 540
    end
532 541

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

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

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

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

  
709
    # deguging output for +msg+
690 710
    def logging(msg)
691 711
      @debug_output << msg + "\n" if @debug_output
692 712
    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