Set
the defaults for this engine with the given flag
.
These flags are used to control combinations of algorithm methods.
flag
can be one of the following, other flags are available depending on your OS.
0xFFFF
0x0000
See also <openssl/engine.h>
Builds a methods for level meth
.
Returns OS code number recorded in the gzip file header.
Returns true
if stat is readable by the real user id of this process.
File.stat("testfile").readable_real? #=> true
If stat is readable by others, returns an integer representing the file permission bits of stat. Returns nil
otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2)
.
m = File.stat("/etc/passwd").world_readable? #=> 420 sprintf("%o", m) #=> "644"
Returns true
if stat is writable by the real user id of this process.
File.stat("testfile").writable_real? #=> true
If stat is writable by others, returns an integer representing the file permission bits of stat. Returns nil
otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2)
.
m = File.stat("/tmp").world_writable? #=> 511 sprintf("%o", m) #=> "777"
Same as executable?
, but tests using the real owner of the process.
The provided block
is passed a header and field for each pair in the row and expected to return true
or false
, depending on whether the pair should be deleted.
This method returns the row for chaining.
If no block is given, an Enumerator
is returned.
Removes any column or row for which the block returns true
. In the default mixed mode or row mode, iteration is the standard row major walking of rows. In column mode, iteration will yield
two element tuples containing the column name and an Array of values for that column.
This method returns the table for chaining.
If no block is given, an Enumerator
is returned.
Routes method calls to the referenced remote object.
Has a method been included in the list of insecure methods?
Routes method calls to the referenced remote object.
Calls wait repeatedly while the given block yields a truthy value.
When true
, connections are in passive mode per default. Default: true
.
When true
, connections are in passive mode per default. Default: true
.
The default port to use for HTTP
requests; defaults to 80.
true if the response has a body.
Gets the entity body returned by the remote HTTP server.
If a block is given, the body is passed to the block, and the body is provided in fragments, as it is read in from the socket.
Calling this method a second or subsequent time for the same HTTPResponse
object will return the value already read.
http.request_get('/index.html') {|res| puts res.read_body } http.request_get('/index.html') {|res| p res.read_body.object_id # 538149362 p res.read_body.object_id # 538149362 } # using iterator http.request_get('/index.html') {|res| res.read_body do |segment| print segment end }