File: C:/Ruby27-x64/share/ri/2.7.0/system/Net/POPMail/pop-i.ri
U:RDoc::AnyMethod[iI"pop:ETI"Net::POPMail#pop;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [
I"CThis method fetches the message. If called with a block, the ;TI"Emessage is yielded to the block one chunk at a time. If called ;TI"Iwithout a block, the message is returned as a String. The optional ;TI"D+dest+ argument will be prepended to the returned String; this ;TI"&argument is essentially obsolete.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading:
leveli: textI"Example without block;T@o:RDoc::Markup::Verbatim; [I"(POP3.start('pop.example.com', 110,
;TI"8 'YourAccount', 'YourPassword') do |pop|
;TI"
n = 1
;TI"# pop.mails.each do |popmail|
;TI"- File.open("inbox/#{n}", 'w') do |f|
;TI" f.write popmail.pop
;TI"
end
;TI" popmail.delete
;TI" n += 1
;TI" end
;TI" end
;T:@format0S;;
i;I"Example with block;T@o;; [I"(POP3.start('pop.example.com', 110,
;TI"8 'YourAccount', 'YourPassword') do |pop|
;TI"
n = 1
;TI"# pop.mails.each do |popmail|
;TI"- File.open("inbox/#{n}", 'w') do |f|
;TI"2 popmail.pop do |chunk| ####
;TI" f.write chunk
;TI" end
;TI"
end
;TI" n += 1
;TI" end
;TI" end
;T;0o;
; [I"6This method raises a POPError if an error occurs.;T:
@fileI"lib/net/pop.rb;T:0@omit_headings_from_table_of_contents_below00I"message_chunk;T[[I"all;To;; [ ;@5;0[I" mail;To;; [ ;@5;0I"( dest = +'' );T@5FI"POPMail;TcRDoc::NormalClass00