Class: G5Updatable::ClientFeedProcessor
- Inherits:
-
Object
- Object
- G5Updatable::ClientFeedProcessor
- Defined in:
- lib/g5_updatable/client_feed_processor.rb
Instance Attribute Summary collapse
-
#client_uid ⇒ Object
readonly
Returns the value of attribute client_uid.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(client_uid = nil) ⇒ ClientFeedProcessor
constructor
A new instance of ClientFeedProcessor.
- #work ⇒ Object
Constructor Details
#initialize(client_uid = nil) ⇒ ClientFeedProcessor
Returns a new instance of ClientFeedProcessor.
4 5 6 7 |
# File 'lib/g5_updatable/client_feed_processor.rb', line 4 def initialize(client_uid=nil) @client_uid = client_uid || ENV["CLIENT_UID"] raise "A client_uid must be either passed in or configured!" if @client_uid.blank? end |
Instance Attribute Details
#client_uid ⇒ Object (readonly)
Returns the value of attribute client_uid.
2 3 4 |
# File 'lib/g5_updatable/client_feed_processor.rb', line 2 def client_uid @client_uid end |
Class Method Details
.load_all_clients(clients_url) ⇒ Object
10 11 12 13 |
# File 'lib/g5_updatable/client_feed_processor.rb', line 10 def load_all_clients(clients_url) client_uids = G5FoundationClient::Client.all_client_uids clients_url client_uids.collect { |client_uid| new(client_uid).work } end |
Instance Method Details
#work ⇒ Object
16 17 18 19 20 21 |
# File 'lib/g5_updatable/client_feed_processor.rb', line 16 def work client = update_client update_locations client end |