Module: AMS::System

Defined in:
system.rb

Class Method Summary (collapse)

Class Method Details

+ (Fixnum) get_metrics(index)

Get system metrics.

Parameters:

  • index (Fixnum)

Returns:

  • (Fixnum)

See Also:

Since:

  • 2.1.0



38
39
40
# File 'system.rb', line 38

def get_metrics(index)
  AMS::C.get_system_metrics(index.to_i)
end

+ (Numeric) get_windows_version

Get windows version.

Returns:

  • (Numeric)

See Also:

Since:

  • 2.0.0



29
30
31
# File 'system.rb', line 29

def get_windows_version
  AMS::C.get_windows_version()
end

+ (Boolean) is_linux?

Determine whether operating system is linux.

Returns:

  • (Boolean)

Since:

  • 2.0.0



21
22
23
# File 'system.rb', line 21

def is_linux?
  RUBY_PLATFORM =~ /linux/i ? true : false
end

+ (Boolean) is_mac?

Determine whether operating system is macintosh.

Returns:

  • (Boolean)

Since:

  • 2.0.0



14
15
16
# File 'system.rb', line 14

def is_mac?
  RUBY_PLATFORM =~ /darwin/i ? true : false
end

+ (Boolean) is_windows?

Determine whether operating system is windows.

Returns:

  • (Boolean)

Since:

  • 2.0.0



7
8
9
# File 'system.rb', line 7

def is_windows?
  RUBY_PLATFORM =~ /mswin|mingw/i ? true : false
end