Module: AMS::System
- Defined in:
- system.rb
Class Method Summary (collapse)
-
+ (Fixnum) get_metrics(index)
Get system metrics.
-
+ (Numeric) get_windows_version
Get windows version.
-
+ (Boolean) is_linux?
Determine whether operating system is linux.
-
+ (Boolean) is_mac?
Determine whether operating system is macintosh.
-
+ (Boolean) is_windows?
Determine whether operating system is windows.
Class Method Details
+ (Fixnum) get_metrics(index)
Get system metrics.
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.
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.
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.
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.
7 8 9 |
# File 'system.rb', line 7 def is_windows? RUBY_PLATFORM =~ /mswin|mingw/i ? true : false end |