Class: ForestClient::QueryAgent

Inherits:
Object
  • Object
show all
Defined in:
lib/forest-client.rb

Instance Method Summary collapse

Constructor Details

#initialize(org_id) ⇒ QueryAgent

Returns a new instance of QueryAgent.



96
97
98
# File 'lib/forest-client.rb', line 96

def initialize(org_id)
    @org_id = org_id
end

Instance Method Details

#runObject



100
101
102
103
104
105
106
107
108
109
110
# File 'lib/forest-client.rb', line 100

def run
    forest = Forest.new(@org_id)

    printers = forest.get_printers
    if printers
        printers.each do |printer|    
            forest.update_printer(printer)
            forest.update_status(printer)
        end
    end
end