Module: Host

Extended by:
Host
Included in:
Host
Defined in:
lib/host.rb,
lib/host/linux.rb,
lib/host/memory.rb,
lib/host/version.rb,
lib/host/hashifier.rb,
lib/host/processor.rb,
lib/host/linux/memory.rb,
lib/host/load_average.rb,
lib/host/linux/processor.rb,
lib/host/linux/load_average.rb

Overview

lib/hot/load_average.rb

Defined Under Namespace

Modules: Hashifier, Linux Classes: LoadAverage, Memory, Processor

Constant Summary collapse

VERSION =
"0.1.3"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.osObject



15
16
17
18
# File 'lib/host.rb', line 15

def self.os
  return :linux if linux?
  return :macosx if macosx?
end

Instance Method Details

#linux?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/host.rb', line 7

def linux?
  check_platform('linux')
end

#macosx?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/host.rb', line 11

def macosx?
  check_platform('darwin')
end