Sha256: f528d1982a5d223a7b9218de5e9970983c13e3a293b4ff96e22e29c5f39a33ae

Contents?: true

Size: 423 Bytes

Versions: 2

Compression:

Stored size: 423 Bytes

Contents

The OS gem allows for some easy telling if you're on windows or not.

require 'os'
>> OS.windows? 
=> true

>> OS.bits
=> 32

>> OS.java?
=> true

>> OS.ruby_bin
=> "c:\ruby18\bin\ruby.exe" # or "/usr/local/bin/ruby" or what not

>> OS.posix?
=> false

>> OS.mac?
=> false

If there are any other features you'd like, let me know.

github.com/rdp/os

Related:

Gem.ruby method

the Platform gem

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
os-0.6.1 README.rdoc
os-0.6.0 README.rdoc