Class: Cuboid::System::Platforms::Linux

Inherits:
Base show all
Includes:
Mixins::Unix
Defined in:
lib/cuboid/system/platforms/linux.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#_exec, #cpu_count, #disk_directory, #disk_space_for_process, #disk_space_free, inherited, #memory_for_process_group

Class Method Details

.current?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/cuboid/system/platforms/linux.rb', line 17

def current?
    Cuboid.linux?
end

Instance Method Details

#memory_freeInteger

Returns Amount of free RAM in bytes.

Returns:

  • (Integer)

    Amount of free RAM in bytes.



12
13
14
# File 'lib/cuboid/system/platforms/linux.rb', line 12

def memory_free
    memory.available_bytes
end