Module: GridTools

Defined in:
lib/grid_tools.rb,
lib/grid_tools/version.rb

Overview

Add requires for other files you add to your project here, so you just need to require this one file in your bin file

Constant Summary collapse

VERSION =
'0.0.9'

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/grid_tools.rb', line 17

def self.linux?
  GridTools.unix? and not GridTools.mac?
end

.mac?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/grid_tools.rb', line 11

def self.mac?
  (/darwin/ =~ RUBY_PLATFORM) != nil
end

.unix?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/grid_tools.rb', line 14

def self.unix?
  !GridTools.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


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

def self.windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
end