Module: Capybara::Screenshot::Os

Defined in:
lib/capybara/screenshot/diff/os.rb

Constant Summary collapse

ON_WINDOWS =
!!(RbConfig::CONFIG["host_os"] =~ /mswin|mingw|cygwin/)
ON_MAC =
!!(RbConfig::CONFIG["host_os"] =~ /darwin/)
ON_LINUX =
!!(RbConfig::CONFIG["host_os"] =~ /linux/)

Class Method Summary collapse

Class Method Details

.nameObject



10
11
12
13
14
15
16
# File 'lib/capybara/screenshot/diff/os.rb', line 10

def self.name
  return "windows" if ON_WINDOWS
  return "macos" if ON_MAC
  return "linux" if ON_LINUX

  "unknown"
end