Class: ApiTester::MissingResponseFieldReport

Inherits:
Object
  • Object
show all
Defined in:
lib/api-tester/reporter/missing_response_field_report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, verb, expected_field, description) ⇒ MissingResponseFieldReport

Returns a new instance of MissingResponseFieldReport.



8
9
10
11
12
13
# File 'lib/api-tester/reporter/missing_response_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

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/api-tester/reporter/missing_response_field_report.rb', line 6

def description
  @description
end

#expected_fieldObject

Returns the value of attribute expected_field.



5
6
7
# File 'lib/api-tester/reporter/missing_response_field_report.rb', line 5

def expected_field
  @expected_field
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/api-tester/reporter/missing_response_field_report.rb', line 3

def url
  @url
end

#verbObject

Returns the value of attribute verb.



4
5
6
# File 'lib/api-tester/reporter/missing_response_field_report.rb', line 4

def verb
  @verb
end

Instance Method Details



15
16
17
18
19
# File 'lib/api-tester/reporter/missing_response_field_report.rb', line 15

def print
  puts "#{self.description}:"
  puts "   #{self.verb} #{self.url} is missing response field:"
  puts "      #{self.expected_field}"
end