class G5FoundationClient::Client
Attributes
client_hash[RW]
Public Class Methods
all_client_uids(clients_uri)
click to toggle source
# File lib/g5_foundation_client/models/client.rb, line 10 def all_client_uids(clients_uri) G5FoundationClient::Fetcher.fetch_url(clients_uri) do |json| hash = ActiveSupport::HashWithIndifferentAccess.new(JSON.parse(json)) hash[:clients].collect { |client| client[:uid] } end end
new(attrs)
click to toggle source
# File lib/g5_foundation_client/models/client.rb, line 5 def initialize(attrs) self.client_hash = ActiveSupport::HashWithIndifferentAccess.new attrs.fetch(:client, attrs) end
Public Instance Methods
locations()
click to toggle source
# File lib/g5_foundation_client/models/client.rb, line 23 def locations @locations ||= self.client_hash[:locations].collect { |lh| G5FoundationClient::Location.new(lh.merge(client: self)) } end