29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/upguard/ConnectionManager.rb', line 29
def from_hash(h)
self.agent_version = h['agent_version'] if h.include?('agent_version')
self.agent_type = h['agent_type'] if h.include?('agent_type')
self.channels = h['channels'] if h.include?('channels')
self.connection_manager_group_id = h['connection_manager_group_id'] if h.include?('connection_manager_group_id')
self.created_at = h['created_at'] if h.include?('created_at')
self.id = h['id'] if h.include?('id')
self.ip_address = h['ip_address'] if h.include?('ip_address')
self.hostname = h['hostname'] if h.include?('hostname')
self.last_contact = h['last_contact'] if h.include?('last_contact')
self.stats = h['stats'] if h.include?('stats')
self.updated_at = h['updated_at'] if h.include?('updated_at')
end
|