Module: PuppetX::Cups::Instances::Queues

Defined in:
lib/puppet_x/cups/instances.rb

Overview

An array of the names of all installed print queues (including classes).

Class Method Summary collapse

Class Method Details

.requestObject


60
61
62
63
64
65
66
67
68
69
70
# File 'lib/puppet_x/cups/instances.rb', line 60

def self.request
  <<-REQUEST
    {
      OPERATION CUPS-Get-Printers
      GROUP operation
      ATTR charset attributes-charset utf-8
      ATTR language attributes-natural-language en
      DISPLAY printer-name
    }
  REQUEST
end

.to_aObject


54
55
56
57
58
# File 'lib/puppet_x/cups/instances.rb', line 54

def self.to_a
  query = PuppetX::Cups::Ipp.query('/', request)

  query.results
end