Module: Delirium::Platform

Defined in:
lib/delirium/platform.rb,
lib/delirium/platform/base.rb,
lib/delirium/platform/linux.rb,
lib/delirium/platform/darwin.rb,
lib/delirium/platform/windows.rb,
lib/delirium/platform/base/mouse.rb,
lib/delirium/platform/linux/mouse.rb,
lib/delirium/platform/darwin/mouse.rb,
lib/delirium/platform/base/keyboard.rb,
lib/delirium/platform/windows/mouse.rb,
lib/delirium/platform/linux/keyboard.rb,
lib/delirium/platform/darwin/keyboard.rb,
lib/delirium/platform/windows/keyboard.rb

Defined Under Namespace

Classes: Base, Darwin, Linux, Windows

Class Method Summary collapse

Class Method Details

.class_for_current_platformObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/delirium/platform.rb', line 3

def self.class_for_current_platform
  case RUBY_PLATFORM.downcase
  when /darwin/
    Delirium::Platform::Darwin
  when /linux/
    Delirium::Platform::Linux
  when /cygwin|mswin|mingw|bccwin|wince|emx/
    Delirium::Platform::Windows
  else
    raise Delirium::Error, "Unsupported Platform: #{platform}"
  end
end