Class: Dupe::Network::Log::Request
- Inherits:
-
Object
- Object
- Dupe::Network::Log::Request
- Defined in:
- lib/superdupe/log.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
-
#verb ⇒ Object
readonly
Returns the value of attribute verb.
Instance Method Summary collapse
-
#initialize(verb, path, response_body) ⇒ Request
constructor
A new instance of Request.
- #pretty_print ⇒ Object
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
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/superdupe/log.rb', line 8 def path @path end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
8 9 10 |
# File 'lib/superdupe/log.rb', line 8 def response_body @response_body end |
#verb ⇒ Object (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_print ⇒ Object
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 |