Module: SeleniumPrep::System::OS
Instance Method Summary collapse
Instance Method Details
#linux? ⇒ Boolean
19 20 21 |
# File 'lib/selenium-prep/system/os.rb', line 19 def linux? unix? and not mac? end |
#mac? ⇒ Boolean
11 12 13 |
# File 'lib/selenium-prep/system/os.rb', line 11 def mac? (/darwin/ =~ RUBY_PLATFORM) != nil end |
#set_type ⇒ Object
23 24 25 26 27 28 |
# File 'lib/selenium-prep/system/os.rb', line 23 def set_type ENV['SE_OS_TYPE'] = 'win' if System::OS.windows? ENV['SE_OS_TYPE'] = 'mac' if System::OS.mac? ENV['SE_OS_TYPE'] = 'linux' if System::OS.linux? ENV['SE_OS_TYPE'] = ENV['SE_OS_TYPE'] + (ENV['SE_OS_TYPE_BIT'] ||= '32') end |
#unix? ⇒ Boolean
15 16 17 |
# File 'lib/selenium-prep/system/os.rb', line 15 def unix? !windows? end |
#windows? ⇒ Boolean
7 8 9 |
# File 'lib/selenium-prep/system/os.rb', line 7 def windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end |