Class: OperaWatir::Platform

Inherits:
Object show all
Defined in:
lib/operawatir/platform.rb

Class Method Summary collapse

Class Method Details

.osObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/operawatir/platform.rb', line 4

def self.os
  @os ||= (
    host_os = RbConfig::CONFIG['host_os']
    case host_os
    when /mswin|msys|mingw|bccwin|wince|emc/
      :windows
    when /darwin|mac os/
      :macosx
    when /linux/
      :linux
    when /solaris|bsd/
      :unix
    else
      raise Exceptions::NotImplementedException, "#{host_os.inspect} not supported"
    end
  )
end