Class: Postful::Letter
Overview
Builder for mailing letters with the Postful Web Service.
Instance Attribute Summary
Attributes inherited from Base
#return_address, #sections, #tag1, #tag2, #tag3
Instance Method Summary collapse
-
#add_html_document(text) ⇒ Object
Add an HTML document to the request.
-
#add_html_document_from_file(filename) ⇒ Object
Add an HTML document to the request.
-
#add_html_document_from_url(url) ⇒ Object
Add an HTML document to the request.
-
#add_open_office_document(text) ⇒ Object
Add an Open Office document to the request.
-
#add_open_office_document_from_file(filename) ⇒ Object
Add an Open Office document to the request.
-
#add_open_office_document_from_url(url) ⇒ Object
Add an Open Office document to the request.
-
#add_pdf_document(text) ⇒ Object
Add a PDF document to the request.
-
#add_pdf_document_from_file(filename) ⇒ Object
Add a PDF document to the request.
-
#add_pdf_document_from_url(url) ⇒ Object
Add a PDF document to the request.
-
#add_rtf_document(text) ⇒ Object
Add a Rich Text Format document to the request.
-
#add_rtf_document_from_file(filename) ⇒ Object
Add a Rich Text Format document to the request.
-
#add_rtf_document_from_url(url) ⇒ Object
Add a Rich Text Format document to the request.
-
#add_text_document(text) ⇒ Object
Add a text document to the request.
-
#add_text_document_from_file(filename) ⇒ Object
Add a text document to the request.
-
#add_text_document_from_url(url) ⇒ Object
Add a text document to the request.
-
#add_word_document(text) ⇒ Object
Add a Microsoft Word document to the request.
-
#add_word_document_from_file(filename) ⇒ Object
Add a Microsoft Word document to the request.
-
#add_word_document_from_url(url) ⇒ Object
Add a Microsoft Word document to the request.
Methods inherited from Base
#add_address, #add_document, #add_international_address, #errors, #initialize, #mail!, #valid?
Constructor Details
This class inherits a constructor from Postful::Base
Instance Method Details
#add_html_document(text) ⇒ Object
Add an HTML document to the request
12 13 14 |
# File 'lib/postful/letter.rb', line 12 def add_html_document(text) add_simple_document('html', text) end |
#add_html_document_from_file(filename) ⇒ Object
Add an HTML document to the request
17 18 19 |
# File 'lib/postful/letter.rb', line 17 def add_html_document_from_file(filename) add_simple_document_from_file('html', filename) end |
#add_html_document_from_url(url) ⇒ Object
Add an HTML document to the request
22 23 24 |
# File 'lib/postful/letter.rb', line 22 def add_html_document_from_url(url) add_simple_document_from_url('html', url) end |
#add_open_office_document(text) ⇒ Object
Add an Open Office document to the request
57 58 59 |
# File 'lib/postful/letter.rb', line 57 def add_open_office_document(text) add_simple_document('odt', text) end |
#add_open_office_document_from_file(filename) ⇒ Object
Add an Open Office document to the request
62 63 64 |
# File 'lib/postful/letter.rb', line 62 def add_open_office_document_from_file(filename) add_simple_document_from_file('odt', filename) end |
#add_open_office_document_from_url(url) ⇒ Object
Add an Open Office document to the request
67 68 69 |
# File 'lib/postful/letter.rb', line 67 def add_open_office_document_from_url(url) add_simple_document_from_file('odt', url) end |
#add_pdf_document(text) ⇒ Object
Add a PDF document to the request
87 88 89 |
# File 'lib/postful/letter.rb', line 87 def add_pdf_document(text) add_simple_document('pdf', text) end |
#add_pdf_document_from_file(filename) ⇒ Object
Add a PDF document to the request
92 93 94 |
# File 'lib/postful/letter.rb', line 92 def add_pdf_document_from_file(filename) add_simple_document_from_file('pdf', filename) end |
#add_pdf_document_from_url(url) ⇒ Object
Add a PDF document to the request
97 98 99 |
# File 'lib/postful/letter.rb', line 97 def add_pdf_document_from_url(url) add_simple_document_from_url('pdf', url) end |
#add_rtf_document(text) ⇒ Object
Add a Rich Text Format document to the request
42 43 44 |
# File 'lib/postful/letter.rb', line 42 def add_rtf_document(text) add_simple_document('rtf', text) end |
#add_rtf_document_from_file(filename) ⇒ Object
Add a Rich Text Format document to the request
47 48 49 |
# File 'lib/postful/letter.rb', line 47 def add_rtf_document_from_file(filename) add_simple_document_from_file('rtf', filename) end |
#add_rtf_document_from_url(url) ⇒ Object
Add a Rich Text Format document to the request
52 53 54 |
# File 'lib/postful/letter.rb', line 52 def add_rtf_document_from_url(url) add_simple_document_from_url('rtf', url) end |
#add_text_document(text) ⇒ Object
Add a text document to the request
72 73 74 |
# File 'lib/postful/letter.rb', line 72 def add_text_document(text) add_simple_document('txt', text) end |
#add_text_document_from_file(filename) ⇒ Object
Add a text document to the request
77 78 79 |
# File 'lib/postful/letter.rb', line 77 def add_text_document_from_file(filename) add_simple_document_from_file('txt', filename) end |
#add_text_document_from_url(url) ⇒ Object
Add a text document to the request
82 83 84 |
# File 'lib/postful/letter.rb', line 82 def add_text_document_from_url(url) add_simple_document_from_url('txt', url) end |
#add_word_document(text) ⇒ Object
Add a Microsoft Word document to the request
27 28 29 |
# File 'lib/postful/letter.rb', line 27 def add_word_document(text) add_simple_document('doc', text) end |
#add_word_document_from_file(filename) ⇒ Object
Add a Microsoft Word document to the request
32 33 34 |
# File 'lib/postful/letter.rb', line 32 def add_word_document_from_file(filename) add_simple_document_from_file('doc', filename) end |
#add_word_document_from_url(url) ⇒ Object
Add a Microsoft Word document to the request
37 38 39 |
# File 'lib/postful/letter.rb', line 37 def add_word_document_from_url(url) add_simple_document_from_url('doc', url) end |