RubyEngine

Provides a RubyEngine to simplify checking on which implementation your Ruby programs is running.

Setup

On your command-line:

$ gem install ruby_engine

In Ruby:

require 'ruby_engine'

Usage

RubyEngine.to_s # outputs the interpreter name

RubyEngine.is? 'jruby' # true for jruby

# There are some query methods defined: 
RubyEngine.mri?
RubyEngine.jruby?
RubyEngine.rubinius?
RubyEngine.ree?
RubyEngine.ironruby?
RubyEngine.macruby?
RubyEngine.cardinal?

J-_-L

Copyright © 2010-2014 Jan Lelis. MIT License. Originated from the zucker gem.