Class: ForestClient::QueryAgent
- Inherits:
-
Object
- Object
- ForestClient::QueryAgent
- Defined in:
- lib/forest-client.rb
Instance Method Summary collapse
-
#initialize(org_id) ⇒ QueryAgent
constructor
A new instance of QueryAgent.
- #run ⇒ Object
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
#run ⇒ Object
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 |