Class: Utilinfo
- Inherits:
-
Object
- Object
- Utilinfo
- Defined in:
- lib/utilinfo.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Utilinfo
constructor
A new instance of Utilinfo.
Constructor Details
#initialize ⇒ Utilinfo
Returns a new instance of Utilinfo.
24 25 26 |
# File 'lib/utilinfo.rb', line 24 def initialize Utilinfo.load_os_module end |
Class Method Details
.load_os_module ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/utilinfo.rb', line 9 def self.load_os_module nix_name = `uname -a` if Gem.win_platform? include WinUtilinfo elsif nix_name && $?.success? if nix_name.to_s.downcase.include?('linux') include LinuxUtilinfo elsif nix_nameto_s..downcase.include?('darwin') include MacUtilinfo end else printf("Could not detect your OS.\n") return end end |