Class: Platform

Inherits:
Object
  • Object
show all
Includes:
Wx
Defined in:
lib/nobbie/wx/platform.rb

Overview

todo: move this into Nobbie::Wx namespace … once name clash is fixed

Constant Summary collapse

WINDOWS =
'WXMSW'
MAC =
'WXMAC'
SUPPORTED_PLATFORMS =
[WINDOWS, MAC]

Class Method Summary collapse

Class Method Details

.ensure_supportedObject



16
17
18
# File 'lib/nobbie/wx/platform.rb', line 16

def self.ensure_supported
  Kernel.raise "Sorry '#{name}' is not currently supported, Nobbie-Wx is only available for the following platforms: [#{SUPPORTED_PLATFORMS.join(',')}]" unless supported?
end

.windows?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/nobbie/wx/platform.rb', line 12

def self.windows?
  name == WINDOWS
end