Results for: "to_proc"

Generates a random prime number of bit length bits. If safe is set to true, generates a safe prime. If add is specified, generates a prime that fulfills condition p % add = rem.

Parameters

Performs a Miller-Rabin primality test. This is same as prime? except this first attempts trial divisions with some small primes.

Parameters

Returns the size in bytes of the blocks on which this Cipher operates on.

Returns the block length of the digest algorithm, i.e. the length in bytes of an individual block. Most modern algorithms partition a message to be digested into a sequence of fix-sized blocks that are processed consecutively.

Example

digest = OpenSSL::Digest::SHA1.new
puts digest.block_length # => 64

Emit a scalar with value and tag

Emit a sequence with list and tag

Emit a sequence with map and tag

Emit an arbitrary object obj and tag

Called when the document starts with the declared version, tag_directives, if the document is implicit.

version will be an array of integers indicating the YAML version being dealt with, tag_directives is a list of tuples indicating the prefix and suffix of each tag, and implicit is a boolean indicating whether the document is started implicitly.

Example

Given the following YAML:

%YAML 1.1
%TAG ! tag:tenderlovemaking.com,2009:
--- !squee

The parameters for start_document must be this:

version         # => [1, 1]
tag_directives  # => [["!", "tag:tenderlovemaking.com,2009:"]]
implicit        # => false

Called with the document ends. implicit is a boolean value indicating whether or not the document has an implicit ending.

Example

Given the following YAML:

---
  hello world

implicit will be true. Given this YAML:

---
  hello world
...

implicit will be false.

Called before each event with line/column information.

No documentation available

Handles start_document events with version, tag_directives, and implicit styling.

See Psych::Handler#start_document

Handles end_document events with version, tag_directives, and implicit styling.

See Psych::Handler#start_document

No documentation available

Start a document emission with YAML version, tags, and an implicit start.

See Psych::Handler#start_document

End a document emission with an implicit ending.

See Psych::Handler#end_document

This method is called when a parse error is found.

ERROR_TOKEN_ID is an internal ID of token which caused error. You can get string representation of this ID by calling token_to_str.

ERROR_VALUE is a value of error token.

value_stack is a stack of symbol values. DO NOT MODIFY this object.

This method raises ParseError by default.

If this method returns, parsers enter “error recovering mode”.

Returns true if this is a header row.

Returns true if this is a field row.

Returns a duplicate table object, in row mode. This is handy for chaining in a single call without changing the table mode, but be aware that this method can consume a fair amount of memory for bigger data sets.

This method returns the duplicate table for chaining. Don’t chain destructive methods (like []=()) this way though, since you are working with a duplicate.

Switches the mode of this table to row mode. All calls to indexing and iteration methods will work with rows until the mode is changed again.

This method returns the table and is safe to chain.

Set the socket used to connect to the FTP server.

May raise FTPReplyError if get_greeting is false.

Gets the body text from the target and outputs it to $stdout. The target can either be specified as (uri), or as (host, path, port = 80); so:

Net::HTTP.get_print URI('http://www.example.com/index.html')

or:

Net::HTTP.get_print 'www.example.com', '/index.html'
No documentation available
Search took: 4ms  ·  Total Results: 1909