Class: CemAcpt::TestRunner::LogFormatter::GossActionResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb

Overview

Formats the results of a Goss action

Constant Summary collapse

INDENT =
'  '

Instance Method Summary collapse

Constructor Details

#initialize(config, instance_names_ips) ⇒ GossActionResponse

Returns a new instance of GossActionResponse.



10
11
12
13
# File 'lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb', line 10

def initialize(config, instance_names_ips)
  @config = config
  @instance_names_ips = instance_names_ips
end

Instance Method Details

#host_name(response) ⇒ Object



31
32
33
# File 'lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb', line 31

def host_name(response)
  name_from_ip(response.host)
end

#inspectObject



15
16
17
# File 'lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb', line 15

def inspect
  to_s
end

#results(response) ⇒ Object



27
28
29
# File 'lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb', line 27

def results(response)
  new_results_message(response.results)
end

#summary(response) ⇒ Object



23
24
25
# File 'lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb', line 23

def summary(response)
  new_summary_message(response)
end

#test_name(response) ⇒ Object



35
36
37
# File 'lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb', line 35

def test_name(response)
  test_from_ip(response.host)
end

#to_sObject



19
20
21
# File 'lib/cem_acpt/test_runner/log_formatter/goss_action_response.rb', line 19

def to_s
  "#<#{self.class.name}:0x#{object_id.to_s(16)}>"
end