Class: ServerDensity::Server

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Server

Returns a new instance of Server.



26
27
28
29
30
# File 'lib/server_density.rb', line 26

def initialize(data)
  @id        = data['serverId']
  @ip        = data['ip']
  @agent_key = data['agentKey']
end

Instance Attribute Details

#agent_keyObject (readonly)

Returns the value of attribute agent_key.



25
26
27
# File 'lib/server_density.rb', line 25

def agent_key
  @agent_key
end

#idObject (readonly)

Returns the value of attribute id.



25
26
27
# File 'lib/server_density.rb', line 25

def id
  @id
end

#ipObject (readonly)

Returns the value of attribute ip.



25
26
27
# File 'lib/server_density.rb', line 25

def ip
  @ip
end