Module: HostOS::Support

Defined in:
lib/host-os/support.rb,
lib/host-os/support.rb

Overview

Note:

You need to require ‘host-os/support` explicitly.

This module provides helpful support methods for the HostOS module.

It adds attributes and methods depending on the detected operating system and Ruby interpreter.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dev_nullString (readonly)

Note:

This attribute is only available on Windows, OS2 and Unix systems.

Returns name of or path to the null device.

Returns:

  • (String)

    name of or path to the null device



# File 'lib/host-os/support.rb', line 13


#open_commandString (readonly)

Note:

This attribute is only available on Windows, MacOS and Linux systems.

Returns name of the open command.

Returns:

  • (String)

    name of the open command



# File 'lib/host-os/support.rb', line 17


#rss_bytesInteger (readonly)

Note:

This attribute is only available on Windows and Unix or when using JRuby

Returns number of bytes used by the current process.

Returns:

  • (Integer)

    number of bytes used by the current process



# File 'lib/host-os/support.rb', line 21


#suggested_thread_countInteger (readonly)

Returns suggested number of threads to use.

Returns:

  • (Integer)

    suggested number of threads to use



# File 'lib/host-os/support.rb', line 26


#temp_dirString (readonly)

Returns name of the temporary directory.

Returns:

  • (String)

    name of the temporary directory



# File 'lib/host-os/support.rb', line 29


Instance Method Details

#app_config_path(app_name) ⇒ String

Note:

This method is only available on Windows and Posix-compatible systems.

Determines the name of the directory where application specific data should be stored.

Parameters:

  • app_name (String)

    name of the application

Returns:

  • (String)

    absolute name of the directory



# File 'lib/host-os/support.rb', line 32