Results for: "minmax"

No documentation available

Initializes the MonitorMixin after being included in a class or when an object has been extended with the MonitorMixin

Returns the original line from source for from the given object.

See ::trace_object_allocations for more information and examples.

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

Combine two CRC-32 check values in to one. crc1 is the first CRC-32 value, crc2 is the second CRC-32 value. len2 is the length of the string used to generate crc2.

Returns the number of malloc() allocations.

Only available if ruby was built with CALC_EXACT_MALLOC_SIZE.

No documentation available

Find the full path to the executable for gem name. If the exec_name is not given, an exception will be raised, otherwise the specified executable’s path is returned. requirements allows you to specify specific gem versions.

The mode needed to read a file as straight binary.

Returns a list of paths matching glob that can be used by a gem to pick up features from other gems. For example:

Gem.find_files('rdoc/discover').each do |path| load path end

if check_load_path is true (the default), then find_files also searches $LOAD_PATH for files as well as gems.

Note that find_files will return all files even if they are from different versions of the same gem. See also find_latest_files

The version of the Marshal format for your Ruby.

Adds a post-install hook that will be passed an Gem::Installer instance when Gem::Installer#install is called

Adds a post-uninstall hook that will be passed a Gem::Uninstaller instance and the spec that was uninstalled when Gem::Uninstaller#uninstall is called

Adds a pre-install hook that will be passed an Gem::Installer instance when Gem::Installer#install is called. If the hook returns false then the install will be aborted.

Adds a pre-uninstall hook that will be passed an Gem::Uninstaller instance and the spec that will be uninstalled when Gem::Uninstaller#uninstall is called

Safely read a file in binary mode on all platforms.

Safely write a file in binary mode on all platforms.

Is this a windows platform?

Find rubygems plugin files in the standard location and load them

Finds the user’s home directory.

The default directory for binaries

No documentation available

Creates hard links; returns nil.

Arguments src and dest should be interpretable as paths.

If src is the path to a file and dest does not exist, creates a hard link at dest pointing to src:

FileUtils.touch('src0.txt')
File.exist?('dest0.txt') # => false
FileUtils.link_entry('src0.txt', 'dest0.txt')
File.file?('dest0.txt')  # => true

If src is the path to a directory and dest does not exist, recursively creates hard links at dest pointing to paths in src:

FileUtils.mkdir_p(['src1/dir0', 'src1/dir1'])
src_file_paths = [
  'src1/dir0/t0.txt',
  'src1/dir0/t1.txt',
  'src1/dir1/t2.txt',
  'src1/dir1/t3.txt',
  ]
FileUtils.touch(src_file_paths)
File.directory?('dest1')        # => true
FileUtils.link_entry('src1', 'dest1')
File.file?('dest1/dir0/t0.txt') # => true
File.file?('dest1/dir0/t1.txt') # => true
File.file?('dest1/dir1/t2.txt') # => true
File.file?('dest1/dir1/t3.txt') # => true

Keyword arguments:

Raises an exception if dest is the path to an existing file or directory and keyword argument remove_destination: true is not given.

Related: FileUtils.ln (has different options).

Creates hard links; returns nil.

Arguments src and dest should be interpretable as paths.

If src is the path to a file and dest does not exist, creates a hard link at dest pointing to src:

FileUtils.touch('src0.txt')
File.exist?('dest0.txt') # => false
FileUtils.link_entry('src0.txt', 'dest0.txt')
File.file?('dest0.txt')  # => true

If src is the path to a directory and dest does not exist, recursively creates hard links at dest pointing to paths in src:

FileUtils.mkdir_p(['src1/dir0', 'src1/dir1'])
src_file_paths = [
  'src1/dir0/t0.txt',
  'src1/dir0/t1.txt',
  'src1/dir1/t2.txt',
  'src1/dir1/t3.txt',
  ]
FileUtils.touch(src_file_paths)
File.directory?('dest1')        # => true
FileUtils.link_entry('src1', 'dest1')
File.file?('dest1/dir0/t0.txt') # => true
File.file?('dest1/dir0/t1.txt') # => true
File.file?('dest1/dir1/t2.txt') # => true
File.file?('dest1/dir1/t3.txt') # => true

Keyword arguments:

Raises an exception if dest is the path to an existing file or directory and keyword argument remove_destination: true is not given.

Related: FileUtils.ln (has different options).

No documentation available
Search took: 5ms  ·  Total Results: 2365