Results for: "OptionParser"

Retrieves the pre-configured API key key or terminates interaction with an error.

Returns true when the user has enabled multifactor authentication from response text and no otp provided by options.

No documentation available

Allows Gem::OptionParser to handle HTTP URIs.

No documentation available

Asks for a password with a prompt

Asks the user to answer question with an answer from the given list.

Foo::Bar &&= baz ^^^^^^^^^^^^^^^^

Foo::Bar ||= baz ^^^^^^^^^^^^^^^^

Foo::Bar &&= baz
^^^^^^^^^^^^^^^^
Foo::Bar ||= baz
^^^^^^^^^^^^^^^^

If the stream begins with a BOM (byte order marker), consumes the BOM and sets the external encoding accordingly; returns the result encoding if found, or nil otherwise:

File.write('t.tmp', "\u{FEFF}abc")
io = File.open('t.tmp', 'rb')
io.set_encoding_by_bom # => #<Encoding:UTF-8>
io.close

File.write('t.tmp', 'abc')
io = File.open('t.tmp', 'rb')
io.set_encoding_by_bom # => nil
io.close

Raises an exception if the stream is not binmode or its encoding has already been set.

Sets the encoding according to the BOM (Byte Order Mark) in the string.

Returns self if the BOM is found, otherwise +nil.

No documentation available

Add a list of paths to the $LOAD_PATH at the proper place.

Open a file with given flags, and protect access with a file lock

Open a file with given flags, and protect access with flock

No documentation available

Returns a URL-encoded string derived from the given string str.

The returned string:

Encoding:

In either case, the returned string has forced encoding Encoding::US_ASCII.

Related: URI.encode_uri_component (encodes ' ' as '%20').

Returns a string decoded from the given URL-encoded string str.

The given string is first encoded as Encoding::ASCII-8BIT (using String#b), then decoded (as below), and finally force-encoded to the given encoding enc.

The returned string:

Related: URI.decode_uri_component (preserves '+').

Returns the string that is used to insert a space before the ‘:’ in JSON objects.

Sets the string that is used to insert a space before the ‘:’ in JSON objects.

This string is put at the end of a line that holds a JSON array.

This string is put at the end of a line that holds a JSON array.

This string is put at the end of a line that holds a JSON array.

Search took: 6ms  ·  Total Results: 3694