Results for: "String#[]"

Sets the continue timeout value, which is the number of seconds to wait for an expected 100 Continue response. If the HTTP object does not receive a response in this many seconds it sends the request body.

No documentation available
No documentation available

Sends a GET request to the server; forms the response into a Net::HTTPResponse object.

The request is based on the Net::HTTP::Get object created from string path and initial headers hash initheader.

With no block given, returns the response object:

http = Net::HTTP.new(hostname)
http.request_get('/todos') # => #<Net::HTTPOK 200 OK readbody=true>

With a block given, calls the block with the response object and returns the response object:

http.request_get('/todos') do |res|
  p res
end # => #<Net::HTTPOK 200 OK readbody=true>

Output:

#<Net::HTTPOK 200 OK readbody=false>

Sends a HEAD request to the server; returns an instance of a subclass of Net::HTTPResponse.

The request is based on the Net::HTTP::Head object created from string path and initial headers hash initheader.

http = Net::HTTP.new(hostname)
http.head('/todos/1') # => #<Net::HTTPOK 200 OK readbody=true>

Sends an HTTP request to the server; returns an instance of a subclass of Net::HTTPResponse.

The request is based on the Net::HTTPRequest object created from string path, string data, and initial headers hash header. That object is an instance of the subclass of Net::HTTPRequest, that corresponds to the given uppercase string name, which must be an HTTP request method or a WebDAV request method.

Examples:

http = Net::HTTP.new(hostname)
http.send_request('GET', '/todos/1')
# => #<Net::HTTPOK 200 OK readbody=true>
http.send_request('POST', '/todos', 'xyzzy')
# => #<Net::HTTPCreated 201 Created readbody=true>
No documentation available
No documentation available

Compose a header for the given node.

Compose a string representing the given inner location field.

Delegates to the end_line of the associated location object.

The start offset of the node in the source. This method is effectively a delegate method to the location object.

Delegates to the start_column of the associated location object.

Returns all of the lines of the source code associated with this node.

Slice the location of the node from the source, starting at the beginning of the line that the location starts on, ending at the end of the line that the location ends on.

Returns true if the node has the static literal flag set.

def contains_keywords?: () -> bool

def contains_splat?: () -> bool

def contains_splat?: () -> bool

def begin_keyword: () -> String?

def variable_call?: () -> bool

def variable_call?: () -> bool

def variable_call?: () -> bool

def variable_call?: () -> bool

def variable_call?: () -> bool

Search took: 7ms  ·  Total Results: 4239