Returns a human readable string that contains corrections
. This formatter is designed to be less verbose to not take too much screen space while being helpful enough to the user.
@example
formatter = DidYouMean::Formatter.new # displays suggestions in two lines with the leading empty line puts formatter.message_for(["methods", "method"]) Did you mean? methods method # => nil # displays an empty line puts formatter.message_for([]) # => nil
Returns a human readable string that contains corrections
. This formatter is designed to be less verbose to not take too much screen space while being helpful enough to the user.
@example
formatter = DidYouMean::Formatter.new # displays suggestions in two lines with the leading empty line puts formatter.message_for(["methods", "method"]) Did you mean? methods method # => nil # displays an empty line puts formatter.message_for([]) # => nil
Returns a human readable string that contains corrections
. This formatter is designed to be less verbose to not take too much screen space while being helpful enough to the user.
@example
formatter = DidYouMean::Formatter.new # displays suggestions in two lines with the leading empty line puts formatter.message_for(["methods", "method"]) Did you mean? methods method # => nil # displays an empty line puts formatter.message_for([]) # => nil
Stop this server.
The main loop performed by a DRbServer’s internal thread.
Accepts a connection from a client, and starts up its own thread to handle it. This thread loops, receiving requests from the client, invoking them on a local object, and returning responses, until the client closes the connection or a local method call fails.
Returns true
; retained for compatibility.
Like Net::HTTP.get
, but writes the returned body to $stdout; returns nil
.
Like Net::HTTP.get
, but returns a Net::HTTPResponse
object instead of the body string.
The username of the proxy server, if one is configured.
Sends a GET request to the path
. Returns the response as a Net::HTTPResponse
object.
When called with a block, passes an HTTPResponse
object to the block. The body of the response will not have been read yet; the block can process it using HTTPResponse#read_body
, if desired.
Returns the response.
This method never raises Net::* exceptions.
response = http.request_get('/index.html') # The entity body is already read in this case. p response['content-type'] puts response.body # Using a block http.request_get('/index.html') {|response| p response['content-type'] response.read_body do |str| # read body now print str end }
true if the response has a body.