Results for: "Array"

foo, = bar ^^^

Visit the targets of a multi-target node.

def foo(**nil); end

^^^^^

def foo(bar: baz); end

^^^^^^^^

def foo(bar:); end

^^^^

Like Enumerable#map, but chains operation to be lazy-evaluated.

(1..Float::INFINITY).lazy.map {|i| i**2 }
#=> #<Enumerator::Lazy: #<Enumerator::Lazy: 1..Infinity>:map>
(1..Float::INFINITY).lazy.map {|i| i**2 }.first(3)
#=> [1, 4, 9]

Like Enumerable#map, but chains operation to be lazy-evaluated.

(1..Float::INFINITY).lazy.map {|i| i**2 }
#=> #<Enumerator::Lazy: #<Enumerator::Lazy: 1..Infinity>:map>
(1..Float::INFINITY).lazy.map {|i| i**2 }.first(3)
#=> [1, 4, 9]

Like Enumerable#select, but chains operation to be lazy-evaluated.

Like Enumerable#select, but chains operation to be lazy-evaluated.

Like Enumerable#reject, but chains operation to be lazy-evaluated.

Like Enumerable#grep, but chains operation to be lazy-evaluated.

Like Enumerable#grep_v, but chains operation to be lazy-evaluated.

Like Enumerable#zip, but chains operation to be lazy-evaluated. However, if a block is given to zip, values are enumerated immediately.

Like Enumerable#take, but chains operation to be lazy-evaluated.

Like Enumerable#drop, but chains operation to be lazy-evaluated.

Like Enumerable#uniq, but chains operation to be lazy-evaluated.

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

No documentation available

Generate a random key with OpenSSL::Random.random_bytes and sets it to the cipher, and returns it.

You must call encrypt or decrypt before calling this method.

Generate a random IV with OpenSSL::Random.random_bytes and sets it to the cipher, and returns it.

You must call encrypt or decrypt before calling this method.

Parses the configuration data read from io and returns the whole content as a Hash.

Emit a scalar with value and tag

Called with encoding when the YAML stream starts. This method is called once per stream. A stream may contain multiple documents.

See the constants in Psych::Parser for the possible values of encoding.

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 when a sequence is started.

anchor is the anchor associated with the sequence or nil. tag is the tag associated with the sequence or nil. implicit a boolean indicating whether or not the sequence was implicitly started. style is an integer indicating the list style.

See the constants in Psych::Nodes::Sequence for the possible values of style.

Example

Here is a YAML document that exercises most of the possible ways this method can be called:

---
- !!seq [
  a
]
- &pewpew
  - b

The above YAML document consists of three lists, an outer list that contains two inner lists. Here is a matrix of the parameters sent to represent these lists:

# anchor    tag                       implicit  style
[nil,       nil,                      true,     1     ]
[nil,       "tag:yaml.org,2002:seq",  false,    2     ]
["pewpew",  nil,                      true,     1     ]
Search took: 3ms  ·  Total Results: 2478