Class: Dupe::Network::Log::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/superdupe/log.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verb, path, response_body) ⇒ Request

Returns a new instance of Request.



10
11
12
# File 'lib/superdupe/log.rb', line 10

def initialize(verb, path, response_body)
  @verb, @path, @response_body = verb, path, response_body
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



8
9
10
# File 'lib/superdupe/log.rb', line 8

def path
  @path
end

#response_bodyObject (readonly)

Returns the value of attribute response_body.



8
9
10
# File 'lib/superdupe/log.rb', line 8

def response_body
  @response_body
end

#verbObject (readonly)

Returns the value of attribute verb.



8
9
10
# File 'lib/superdupe/log.rb', line 8

def verb
  @verb
end

Instance Method Details

#pretty_printObject



14
15
16
17
# File 'lib/superdupe/log.rb', line 14

def pretty_print
  "Request: #{@verb.to_s.upcase} #{@path}\n" +
  "Response:\n" + @response_body.indent
end