Creates an obscured password in realm
with user
and password
using the auth_type
of this database.
Returns a new lazy enumerator with the concatenated results of running block
once for every element in the lazy enumerator.
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force #=> ["f", "o", "o", "b", "a", "r"]
A value x
returned by block
is decomposed if either of the following conditions is true:
x
responds to both each and force, which means that x
is a lazy enumerator.
x
is an array or responds to to_ary.
Otherwise, x
is contained as-is in the return value.
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force #=> [{:a=>1}, {:b=>2}]
Like Enumerable#filter_map
, but chains operation to be lazy-evaluated.
(1..).lazy.filter_map { |i| i * 2 if i.even? }.first(5) #=> [4, 8, 12, 16, 20]
Loads the given private key identified by id and data.
An EngineError
is raised of the OpenSSL::PKey
is unavailable.
Return the best specification that contains the file matching path
.
Specification
attributes that must be non-nil
Make sure the YAML specification is properly formatted with dashes
Finds all gems that satisfy dep
Create a new session id.
The session id is a secure random number by SecureRandom
if possible, otherwise an SHA512 hash based upon the time, a random number, and a constant string. This routine is used internally for automatically generated session ids.
Creates a regular expression to match IPv4 addresses
Check that a method is callable via dRuby.
obj
is the object we want to invoke the method on. msg_id
is the method name, as a Symbol
.
If the method is an insecure method (see insecure_method?
) a SecurityError
is thrown. If the method is private or undefined, a NameError
is thrown.
Returns the max number of flags interned to symbols.