Class: HylaFAX::SendFax
Constant Summary collapse
- DEFAULT_TMP_DIR =
'tmp'
- DEFAULT_PAGEWIDTH =
209
- DEFAULT_PAGELENGTH =
296
- DEFAULT_PAGECHOP =
'NONE'
- DEFAULT_CHOPTHRESHOLD =
0
- DOCUMENT_PREFIX =
'doc.'
Constants inherited from Command
Command::DEFAULT_HOST, Command::DEFAULT_PASSWORD, Command::DEFAULT_PORT, Command::DEFAULT_USER
Instance Attribute Summary collapse
-
#dialstring ⇒ Object
readonly
Returns the value of attribute dialstring.
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#job_id ⇒ Object
readonly
Returns the value of attribute job_id.
-
#pagelength ⇒ Object
readonly
Returns the value of attribute pagelength.
-
#pagewidth ⇒ Object
readonly
Returns the value of attribute pagewidth.
-
#tmp_dir ⇒ Object
readonly
Returns the value of attribute tmp_dir.
Attributes inherited from Command
#ftp, #host, #password, #port, #user
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ SendFax
constructor
A new instance of SendFax.
- #run ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ SendFax
Returns a new instance of SendFax.
13 14 15 16 17 18 19 20 21 |
# File 'lib/hylafax/send_fax.rb', line 13 def initialize(opts = {}) super @tmp_dir = opts.fetch(:tmp_dir) { DEFAULT_TMP_DIR } @dialstring = opts.fetch(:dialstring) @document = opts.fetch(:document) @pagewidth = opts.fetch(:pagewidth) { DEFAULT_PAGEWIDTH } @pagelength = opts.fetch(:pagelength) { DEFAULT_PAGELENGTH } @job_id = nil end |
Instance Attribute Details
#dialstring ⇒ Object (readonly)
Returns the value of attribute dialstring.
10 11 12 |
# File 'lib/hylafax/send_fax.rb', line 10 def dialstring @dialstring end |
#document ⇒ Object (readonly)
Returns the value of attribute document.
10 11 12 |
# File 'lib/hylafax/send_fax.rb', line 10 def document @document end |
#job_id ⇒ Object (readonly)
Returns the value of attribute job_id.
10 11 12 |
# File 'lib/hylafax/send_fax.rb', line 10 def job_id @job_id end |
#pagelength ⇒ Object (readonly)
Returns the value of attribute pagelength.
10 11 12 |
# File 'lib/hylafax/send_fax.rb', line 10 def pagelength @pagelength end |
#pagewidth ⇒ Object (readonly)
Returns the value of attribute pagewidth.
10 11 12 |
# File 'lib/hylafax/send_fax.rb', line 10 def pagewidth @pagewidth end |
#tmp_dir ⇒ Object (readonly)
Returns the value of attribute tmp_dir.
10 11 12 |
# File 'lib/hylafax/send_fax.rb', line 10 def tmp_dir @tmp_dir end |
Instance Method Details
#run ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/hylafax/send_fax.rb', line 23 def run connect login upload_document create_new_job set_lasttime set_dialstring set_pagewidth set_pagelength set_pagechop set_chopthreshold set_document submit_job job_id end |