Results for: "module_function"

Returns the password component after URI decoding.

Calls the given block once for each key, value pair in the database. Deletes all entries for which the block returns true.

Returns self.

No documentation available

Invoked by Kernel#sleep and Mutex#sleep and is expected to provide an implementation of sleeping in a non-blocking way. Implementation might register the current fiber in some list of “which fiber wait until what moment”, call Fiber.yield to pass control, and then in close resume the fibers whose wait period has elapsed.

Reads the file from pathname, then parses it like ::parse, returning the root node of the abstract syntax tree.

SyntaxError is raised if pathname’s contents are not valid Ruby syntax.

RubyVM::AbstractSyntaxTree.parse_file("my-app/app.rb")
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-31:3>

See ::parse for explanation of keyword argument meaning and usage.

Synonym for CGI.escapeElement(str)

Returns the length of the hash value of the digest.

This method should be overridden by each implementation subclass. If not, digest_obj.digest().length() is returned.

Returns the block length of the digest.

This method is overridden by each implementation subclass.

Similar to decode with the difference that decode expects one distinct value represented in der. decode_all on the contrary decodes a sequence of sequential BER/DER values lined up in der and returns them as an array.

Example

ders = File.binread('asn1data_seq')
asn1_ary = OpenSSL::ASN1.decode_all(ders)

Generate an File Upload Input element as a string.

The attributes of the element can be specified as three arguments, name, size, and maxlength. maxlength is the maximum length of the file’s name, not of the file’s contents.

Alternatively, the attributes can be specified as a hash.

See multipart_form() for forms that include file uploads.

file_field("name")
  # <INPUT TYPE="file" NAME="name" SIZE="20">

file_field("name", 40)
  # <INPUT TYPE="file" NAME="name" SIZE="40">

file_field("name", 40, 100)
  # <INPUT TYPE="file" NAME="name" SIZE="40" MAXLENGTH="100">

file_field("NAME" => "name", "SIZE" => 40)
  # <INPUT TYPE="file" NAME="name" SIZE="40">
No documentation available
No documentation available

Returns the integer representing length of the value of field 'Content-Range', or nil if no such field exists; see Content-Range response header:

res = Net::HTTP.get_response(hostname, '/todos/1')
res['Content-Range'] # => nil
res['Content-Range'] = 'bytes 0-499/1000'
res.range_length     # => 500

A convenience method which is same as follows:

text ','
breakable

Temporarily turn off warnings. Intended for tests only.

Temporarily turn off warnings. Intended for tests only.

No documentation available
No documentation available

Remove any non-printable characters and make the text suitable for printing.

Displays an error statement to the error output location. Asks a question if given.

Displays a warning statement to the warning output location. Asks a question if given.

Invokes system, but silences all output.

No documentation available

Change the current process’s real and effective user ID to that specified by user. Returns the new user ID. Not available on all platforms.

[Process.uid, Process.euid]          #=> [0, 0]
Process::UID.change_privilege(31)    #=> 31
[Process.uid, Process.euid]          #=> [31, 31]

Set the effective user ID, and if possible, the saved user ID of the process to the given user. Returns the new effective user ID. Not available on all platforms.

[Process.uid, Process.euid]          #=> [0, 0]
Process::UID.grant_privilege(31)     #=> 31
[Process.uid, Process.euid]          #=> [0, 31]
Search took: 10ms  ·  Total Results: 5313