Class: RSpec::Httpd::Client

Inherits:
Simple::HTTP
  • Object
show all
Defined in:
lib/rspec/httpd/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#responseObject (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

#contentObject



12
13
14
# File 'lib/rspec/httpd/client.rb', line 12

def content
  @response.content
end