returns array of WIN32OLE_PARAM object corresponding with method parameters.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') p method.params # => [Filename, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AccessMode, ConflictResolution, AddToMru, TextCodepage, TextVisualLayout]
Returns the type library version.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library') puts tlib.version #-> "1.3"
Returns OLE variant type.
obj = WIN32OLE_VARIANT.new("string") obj.vartype # => WIN32OLE::VARIANT::VT_BSTR
Changes the parameters of the deflate stream to allow changes between different types of data that require different types of compression. Any unprocessed data is flushed before changing the params.
See Zlib::Deflate.new
for a description of level
and strategy
.
Returns last modification time recorded in the gzip file header.
Specify the modification time (mtime
) in the gzip header. Using an Integer
.
Setting the mtime in the gzip header does not effect the mtime of the file generated. Different utilities that expand the gzipped files may use the mtime header. For example the gunzip utility can use the ‘-N` flag which will set the resultant file’s mtime to the value in the header. By default many tools will set the mtime of the expanded file to the mtime of the gzipped file, not the mtime in the header.
If you do not set an mtime, the default value will be the time when compression started. Setting a value of 0 indicates no time stamp is available.
Returns the last access time for this file as an object of class Time
.
File.stat("testfile").atime #=> Wed Dec 31 18:00:00 CST 1969
Returns the modification time of stat.
File.stat("testfile").mtime #=> Wed Apr 09 08:53:14 CDT 2003
Returns the change time for stat (that is, the time directory information about the file was changed, not the file itself).
Note that on Windows (NTFS), returns creation time (birth time).
File.stat("testfile").ctime #=> Wed Apr 09 08:53:14 CDT 2003
Returns true
if stat has its sticky bit set, false
if it doesn’t or if the operating system doesn’t support this feature.
File.stat("testfile").sticky? #=> false
Parse a raw cookie string into a hash of cookie-name=>Cookie pairs.
cookies = CGI::Cookie.parse("raw_cookie_string") # { "name1" => cookie1, "name2" => cookie2, ... }
A set of tasks to prepare the file in order to parse it
Returns true
; retained for compatibility.
Creates a new Net::HTTP object, http
, via Net::HTTP.new:
For arguments address
and port
, see Net::HTTP.new
.
For proxy-defining arguments p_addr
through p_pass
, see Proxy Server.
For argument opts
, see below.
With no block given:
Calls http.start
with no block (see start
), which opens a TCP connection and HTTP session.
Returns http
.
The caller should call finish
to close the session:
http = Net::HTTP.start(hostname) http.started? # => true http.finish http.started? # => false
With a block given:
Calls http.start
with the block (see start
), which:
Opens a TCP connection and HTTP session.
Calls the block, which may make any number of requests to the host.
Closes the HTTP session and TCP connection on block exit.
Returns the block’s value object
.
Returns object
.
Example:
hostname = 'jsonplaceholder.typicode.com' Net::HTTP.start(hostname) do |http| puts http.get('/todos/1').body puts http.get('/todos/2').body end
Output:
{ "userId": 1, "id": 1, "title": "delectus aut autem", "completed": false } { "userId": 1, "id": 2, "title": "quis ut nam facilis et officia qui", "completed": false }
If the last argument given is a hash, it is the opts
hash, where each key is a method or accessor to be called, and its value is the value to be set.
The keys may include:
Note: If port
is nil
and opts[:use_ssl]
is a truthy value, the value passed to new
is Net::HTTP.https_default_port
, not port
.
Returns true
if the HTTP session has been started:
http = Net::HTTP.new(hostname) http.started? # => false http.start http.started? # => true http.finish # => nil http.started? # => false Net::HTTP.start(hostname) do |http| http.started? end # => true http.started? # => false
Starts an HTTP session.
Without a block, returns self
:
http = Net::HTTP.new(hostname) # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false> http.start # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=true> http.started? # => true http.finish
With a block, calls the block with self
, finishes the session when the block exits, and returns the block’s value:
http.start do |http| http end # => #<Net::HTTP jsonplaceholder.typicode.com:80 open=false> http.started? # => false
def lparen: () -> String
?
def rparen: () -> String
?
def lparen: () -> String
?
def rparen: () -> String
?
def lparen: () -> String
?