Class: PuppetX::Cups::Queue::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet_x/cups/queue.rb

Overview

Wrapper class for queue attribute queries

Instance Method Summary collapse

Constructor Details

#initialize(queue, name) ⇒ Attribute


18
19
20
21
# File 'lib/puppet_x/cups/queue.rb', line 18

def initialize(queue, name)
  @queue = queue
  @name = name
end

Instance Method Details

#valueObject


23
24
25
26
27
# File 'lib/puppet_x/cups/queue.rb', line 23

def value
  query = PuppetX::Cups::Ipp.query(resource, request)

  query.results.empty? ? '' : query.results.first
end