Class: Transport::HTTP::Formatter::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/transport/http/formatter.rb

Overview

Response formatter.

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



48
49
50
# File 'lib/transport/http/formatter.rb', line 48

def initialize(response)
  @response = response
end

Instance Method Details

#messageObject



52
53
54
55
56
# File 'lib/transport/http/formatter.rb', line 52

def message
  message = "response: #{@response.code}\n"
  message += Formatter.intend("  #{@response.body}")
  message
end