Class: HylaFAX::FaxStat

Inherits:
Command show all
Defined in:
lib/hylafax/fax_stat.rb

Constant Summary collapse

DEFAULT_QUEUE =
'doneq'
JOB_FORMAT =
'%j %a'
STATES =
{
  '?' => :undefined,
  'T' => :suspended,
  'P' => :pending,
  'S' => :sleeping,
  'B' => :blocked,
  'W' => :waiting,
  'R' => :running,
  'D' => :done,
  'F' => :failed,
}

Constants inherited from Command

Command::DEFAULT_HOST, Command::DEFAULT_PASSWORD, Command::DEFAULT_PORT, Command::DEFAULT_USER

Instance Attribute Summary collapse

Attributes inherited from Command

#ftp, #host, #password, #port, #user

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ FaxStat

Returns a new instance of FaxStat.



19
20
21
22
# File 'lib/hylafax/fax_stat.rb', line 19

def initialize(opts = {})
  super
  @queue = opts.fetch(:queue) { DEFAULT_QUEUE }
end

Instance Attribute Details

#queueObject (readonly)

Returns the value of attribute queue.



17
18
19
# File 'lib/hylafax/fax_stat.rb', line 17

def queue
  @queue
end

Instance Method Details

#runObject



24
25
26
27
28
29
# File 'lib/hylafax/fax_stat.rb', line 24

def run
  connect
  
  set_jobformat
  list
end