Class: CemAcpt::Goss::Api::ActionResponseResult

Inherits:
Object
  • Object
show all
Includes:
DurationHandler
Defined in:
lib/cem_acpt/goss/api/action_response.rb

Constant Summary

Constants included from DurationHandler

DurationHandler::DURATION_UNITS

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_result) ⇒ ActionResponseResult

Returns a new instance of ActionResponseResult.



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/cem_acpt/goss/api/action_response.rb', line 152

def initialize(raw_result)
  @raw_result = raw_result
  @duration = @raw_result['duration']
  @err = @raw_result['err']
  @expected = @raw_result['expected']
  @found = @raw_result['found']
  @human = @raw_result['human']
  @meta = @raw_result['meta']
  @property = @raw_result['property']
  @resource_id = @raw_result['resource-id']
  @resource_type = @raw_result['resource-type']
  @result = @raw_result['result']
  @skipped = @raw_result['skipped']
  @successful = @raw_result['successful']
  @summary_line = @raw_result['summary-line']
  @summary_line_compact = @raw_result['summary-line-compact']
  @test_type = @raw_result['test-type']
  @title = @raw_result['title']
end

Instance Attribute Details

#durationObject (readonly)

Returns the value of attribute duration.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def duration
  @duration
end

#errObject (readonly) Also known as: error

Returns the value of attribute err.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def err
  @err
end

#expectedObject (readonly)

Returns the value of attribute expected.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def expected
  @expected
end

#foundObject (readonly)

Returns the value of attribute found.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def found
  @found
end

#humanObject (readonly)

Returns the value of attribute human.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def human
  @human
end

#metaObject (readonly)

Returns the value of attribute meta.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def meta
  @meta
end

#propertyObject (readonly)

Returns the value of attribute property.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def property
  @property
end

#resource_idObject (readonly)

Returns the value of attribute resource_id.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def resource_id
  @resource_id
end

#resource_typeObject (readonly)

Returns the value of attribute resource_type.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def resource_type
  @resource_type
end

#resultObject (readonly)

Returns the value of attribute result.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def result
  @result
end

#skippedObject (readonly) Also known as: skipped?

Returns the value of attribute skipped.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def skipped
  @skipped
end

#successfulObject (readonly) Also known as: success?

Returns the value of attribute successful.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def successful
  @successful
end

#summary_lineObject (readonly) Also known as: to_s

Returns the value of attribute summary_line.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def summary_line
  @summary_line
end

#summary_line_compactObject (readonly)

Returns the value of attribute summary_line_compact.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def summary_line_compact
  @summary_line_compact
end

#test_typeObject (readonly)

Returns the value of attribute test_type.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def test_type
  @test_type
end

#titleObject (readonly)

Returns the value of attribute title.



148
149
150
# File 'lib/cem_acpt/goss/api/action_response.rb', line 148

def title
  @title
end

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


180
181
182
# File 'lib/cem_acpt/goss/api/action_response.rb', line 180

def error?
  !err.nil?
end

#to_hObject



176
177
178
# File 'lib/cem_acpt/goss/api/action_response.rb', line 176

def to_h
  @raw_result
end