Results for: "module_function"

Passes elements to the block until the block returns nil or false, then stops iterating and returns an array of all prior elements.

If no block is given, an enumerator is returned instead.

a = [1, 2, 3, 4, 5, 0]
a.take_while { |i| i < 3 }   #=> [1, 2]

Drops elements up to, but not including, the first element for which the block returns nil or false and returns an array containing the remaining elements.

If no block is given, an enumerator is returned instead.

a = [1, 2, 3, 4, 5, 0]
a.drop_while { |i| i < 3 }   #=> [3, 4, 5, 0]

Returns a hash that contains filename as key and coverage array as value.

Dump the contents of the ruby heap as JSON.

This method is only expected to work with C Ruby. This is an experimental method and is subject to change. In particular, the function signature and output format are not guaranteed to be compatible in future versions of ruby.

Parse a file at filename. Returns the Psych::Nodes::Document.

Raises a Psych::SyntaxError when a YAML syntax error is detected.

Dump a list of objects as separate documents to a document stream.

Example:

Psych.dump_stream("foo\n  ", {}) # => "--- ! \"foo\\n  \"\n--- {}\n"

Load the document contained in filename. Returns the yaml contained in filename as a Ruby object, or if the file is empty, it returns the specified default return value, which defaults to an empty Hash

Delete text between start and end in the current line.

See GNU Readline’s rl_delete_text function.

Raises NotImplementedError if the using readline library does not support.

Combine two Adler-32 check values in to one. alder1 is the first Adler-32 value, adler2 is the second Adler-32 value. len2 is the length of the string used to generate adler2.

Returns the table for calculating CRC checksum as an array.

Returns true if the named file is readable by the real user and group id of this process. See access(3).

If file_name is readable by others, returns an integer representing the file permission bits of file_name. Returns nil otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2).

file_name can be an IO object.

File.world_readable?("/etc/passwd")           #=> 420
m = File.world_readable?("/etc/passwd")
sprintf("%o", m)                              #=> "644"

Returns true if the named file is writable by the real user and group id of this process. See access(3)

If file_name is writable by others, returns an integer representing the file permission bits of file_name. Returns nil otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2).

file_name can be an IO object.

File.world_writable?("/tmp")                  #=> 511
m = File.world_writable?("/tmp")
sprintf("%o", m)                              #=> "777"

Returns true if the named file is executable by the real user and group id of this process. See access(3).

Returns the Base64-decoded version of str. This method complies with “Base 64 Encoding with URL and Filename Safe Alphabet” in RFC 4648. The alphabet uses ‘-’ instead of ‘+’ and ‘_’ instead of ‘/’.

The padding character is optional. This method accepts both correctly-padded and unpadded input. Note that it still rejects incorrectly-padded input.

Removes server from the list of registered servers.

Removes server from the list of registered servers.

Copies file contents of src to dest. Both of src and dest must be a path name.

Copies file contents of src to dest. Both of src and dest must be a path name.

This method removes a file system entry path. path might be a regular file, a directory, or something. If path is a directory, remove it recursively.

See also remove_entry_secure.

This method removes a file system entry path. path might be a regular file, a directory, or something. If path is a directory, remove it recursively.

See also remove_entry_secure.

Removes a directory dir and its contents recursively. This method ignores StandardError if force is true.

Removes a directory dir and its contents recursively. This method ignores StandardError if force is true.

Returns true if the contents of a file A and a file B are identical.

FileUtils.compare_file('somefile', 'somefile')  #=> true
FileUtils.compare_file('/bin/cp', '/bin/mv')    #=> maybe false
Search took: 7ms  ·  Total Results: 3558