Class: GuessOS::Type

Inherits:
Object
  • Object
show all
Defined in:
lib/guess_os/type.rb

Constant Summary collapse

TYPES =
[Windows, GNULinux, MacOS, Cygwin, Minix]

Class Method Summary collapse

Class Method Details

.guess(host) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/guess_os/type.rb', line 7

def self.guess(host)
  TYPES.each do |klass|
    os = klass.send :guess, host
    return os unless os.type == :unkown
  end
  os
end