Class: Cloudscale::Benchmark::BenchmarkAgentInstance

Inherits:
Object
  • Object
show all
Includes:
Hashable
Defined in:
lib/cloudscale/benchmark/model/agent/benchmark_agent_instance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(benchmarkAgent, agentInstanceId, customer, server, started) ⇒ BenchmarkAgentInstance

Returns a new instance of BenchmarkAgentInstance.



16
17
18
19
20
21
22
# File 'lib/cloudscale/benchmark/model/agent/benchmark_agent_instance.rb', line 16

def initialize(benchmarkAgent, agentInstanceId, customer, server, started)
  @benchmarkAgent = benchmarkAgent
  @agentInstanceId = agentInstanceId
  @customer = customer
  @server = server
  @started = started
end

Instance Attribute Details

#agentInstanceIdObject

Returns the value of attribute agentInstanceId.



14
15
16
# File 'lib/cloudscale/benchmark/model/agent/benchmark_agent_instance.rb', line 14

def agentInstanceId
  @agentInstanceId
end

#benchmarkAgentObject

Returns the value of attribute benchmarkAgent.



14
15
16
# File 'lib/cloudscale/benchmark/model/agent/benchmark_agent_instance.rb', line 14

def benchmarkAgent
  @benchmarkAgent
end

#customerObject

Returns the value of attribute customer.



14
15
16
# File 'lib/cloudscale/benchmark/model/agent/benchmark_agent_instance.rb', line 14

def customer
  @customer
end

#serverObject

Returns the value of attribute server.



14
15
16
# File 'lib/cloudscale/benchmark/model/agent/benchmark_agent_instance.rb', line 14

def server
  @server
end

#startedObject

Returns the value of attribute started.



14
15
16
# File 'lib/cloudscale/benchmark/model/agent/benchmark_agent_instance.rb', line 14

def started
  @started
end

Instance Method Details

#to_hObject



24
25
26
27
28
# File 'lib/cloudscale/benchmark/model/agent/benchmark_agent_instance.rb', line 24

def to_h
  hash = {}
  instance_variables.each {|var| hash[var.to_s.delete("@")] = instance_variable_get(var) }
  return hash
end