Class: Async::HTTP::WebMockEndpoint
- Inherits:
-
Object
- Object
- Async::HTTP::WebMockEndpoint
- Defined in:
- lib/webmock/http_lib_adapters/async_http_client_adapter.rb
Instance Attribute Summary collapse
-
#authority ⇒ Object
readonly
Returns the value of attribute authority.
-
#protocol ⇒ Object
readonly
Returns the value of attribute protocol.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
Instance Method Summary collapse
- #connect ⇒ Object
-
#initialize(scheme, authority, protocol) ⇒ WebMockEndpoint
constructor
A new instance of WebMockEndpoint.
- #inspect ⇒ Object
Constructor Details
#initialize(scheme, authority, protocol) ⇒ WebMockEndpoint
Returns a new instance of WebMockEndpoint.
145 146 147 148 149 |
# File 'lib/webmock/http_lib_adapters/async_http_client_adapter.rb', line 145 def initialize(scheme, , protocol) @scheme = scheme @authority = @protocol = protocol end |
Instance Attribute Details
#authority ⇒ Object (readonly)
Returns the value of attribute authority.
151 152 153 |
# File 'lib/webmock/http_lib_adapters/async_http_client_adapter.rb', line 151 def @authority end |
#protocol ⇒ Object (readonly)
Returns the value of attribute protocol.
151 152 153 |
# File 'lib/webmock/http_lib_adapters/async_http_client_adapter.rb', line 151 def protocol @protocol end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
151 152 153 |
# File 'lib/webmock/http_lib_adapters/async_http_client_adapter.rb', line 151 def scheme @scheme end |
Instance Method Details
#connect ⇒ Object
153 154 155 156 157 158 159 |
# File 'lib/webmock/http_lib_adapters/async_http_client_adapter.rb', line 153 def connect server_socket, client_socket = create_connected_sockets Async(transient: true) do accept_socket(server_socket) end client_socket end |
#inspect ⇒ Object
161 162 163 |
# File 'lib/webmock/http_lib_adapters/async_http_client_adapter.rb', line 161 def inspect "\#<#{self.class}> #{scheme}://#{} protocol=#{protocol}" end |