Class: Platform

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

Overview

Helper functions for determining platform

Class Method Summary collapse

Class Method Details

.linux? ⇒ Boolean

Returns:

  • (Boolean)


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

def self.linux?
	return RUBY_PLATFORM =~ /linux/
end

.mac? ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/gamebox/lib/platform.rb', line 4

def self.mac?
  return RUBY_PLATFORM =~ /darwin/
end

.windows? ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/gamebox/lib/platform.rb', line 8

def self.windows?
  return RUBY_PLATFORM =~ /mswin/
end