Class: RSpec::Httpd::Client
- Inherits:
-
Simple::HTTP
- Object
- Simple::HTTP
- RSpec::Httpd::Client
- Defined in:
- lib/rspec/httpd/client.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(host:, port:) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(host:, port:) ⇒ Client
Returns a new instance of Client.
5 6 7 8 |
# File 'lib/rspec/httpd/client.rb', line 5 def initialize(host:, port:) super() self.base_url = "http://#{host}:#{port}" end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
10 11 12 |
# File 'lib/rspec/httpd/client.rb', line 10 def response @response end |
Instance Method Details
#content ⇒ Object
12 13 14 |
# File 'lib/rspec/httpd/client.rb', line 12 def content @response.content end |