Class: ApiTester::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/api_tester/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



5
6
7
# File 'lib/api_tester/response.rb', line 5

def initialize(response)
  @response = response
end

Instance Method Details

#displayObject



9
10
11
12
13
14
15
16
17
18
# File 'lib/api_tester/response.rb', line 9

def display
  # Display status with color
  display_status

  # Display headers in a table format
  display_headers

  # Display body
  display_body
end