Class: Amp4eLdapTool::AMP::Computer

Inherits:
Object
  • Object
show all
Defined in:
lib/amp4e_ldap_tool/endpoints.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Computer

Returns a new instance of Computer.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/amp4e_ldap_tool/endpoints.rb', line 7

def initialize(json)
  @name       = json["hostname"]
  @guid       = json["connector_guid"]
  @active     = json["active"]
  @group_guid = json["group_guid"]
  @os         = json["operating_system"]
  @link       = { computer: json["links"]["computer"],
                  trajectory: json["links"]["trajectory"],
                  group: json["links"]["group"]}
  @policy     = { name: json["policy"]["name"],
                  guid: json["policy"]["guid"] }
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



4
5
6
# File 'lib/amp4e_ldap_tool/endpoints.rb', line 4

def active
  @active
end

#group_guidObject

Returns the value of attribute group_guid.



4
5
6
# File 'lib/amp4e_ldap_tool/endpoints.rb', line 4

def group_guid
  @group_guid
end

#guidObject

Returns the value of attribute guid.



4
5
6
# File 'lib/amp4e_ldap_tool/endpoints.rb', line 4

def guid
  @guid
end

Returns the value of attribute link.



4
5
6
# File 'lib/amp4e_ldap_tool/endpoints.rb', line 4

def link
  @link
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/amp4e_ldap_tool/endpoints.rb', line 4

def name
  @name
end

#osObject

Returns the value of attribute os.



4
5
6
# File 'lib/amp4e_ldap_tool/endpoints.rb', line 4

def os
  @os
end

#policyObject

Returns the value of attribute policy.



4
5
6
# File 'lib/amp4e_ldap_tool/endpoints.rb', line 4

def policy
  @policy
end