Class: ApiTester::MissingFieldReport
- Inherits:
-
Object
- Object
- ApiTester::MissingFieldReport
- Defined in:
- lib/api-tester/reporter/missing_field_report.rb
Overview
Report used for when response is missing a field
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#expected_field ⇒ Object
Returns the value of attribute expected_field.
-
#url ⇒ Object
Returns the value of attribute url.
-
#verb ⇒ Object
Returns the value of attribute verb.
Instance Method Summary collapse
-
#initialize(url:, verb:, expected_field:, description:) ⇒ MissingFieldReport
constructor
A new instance of MissingFieldReport.
- #print ⇒ Object
Constructor Details
#initialize(url:, verb:, expected_field:, description:) ⇒ MissingFieldReport
Returns a new instance of MissingFieldReport.
8 9 10 11 12 13 |
# File 'lib/api-tester/reporter/missing_field_report.rb', line 8 def initialize(url:, verb:, expected_field:, description:) self.url = url self.verb = verb self.expected_field = expected_field self.description = description end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/api-tester/reporter/missing_field_report.rb', line 6 def description @description end |
#expected_field ⇒ Object
Returns the value of attribute expected_field.
6 7 8 |
# File 'lib/api-tester/reporter/missing_field_report.rb', line 6 def expected_field @expected_field end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/api-tester/reporter/missing_field_report.rb', line 6 def url @url end |
#verb ⇒ Object
Returns the value of attribute verb.
6 7 8 |
# File 'lib/api-tester/reporter/missing_field_report.rb', line 6 def verb @verb end |
Instance Method Details
#print ⇒ Object
15 16 17 18 19 |
# File 'lib/api-tester/reporter/missing_field_report.rb', line 15 def print puts "#{description}:" puts " #{verb} #{url} is missing response field:" puts " #{expected_field}" end |