Project

which_ruby

0.0
No commit activity in last 3 years
No release in over 3 years
which_ruby is a simple helper for checking running Ruby engine
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

About

which_ruby is a simple helper for checking running Ruby engines.

Usage

include WhichRuby in irb:

rvm use jruby
gem install which_ruby
irb
 > require 'which_ruby'
=> true 
 > include WhichRuby
=> Object

access the API:

 > ruby_type
=> :jruby
 > rt
=> :jruby
 > is_ruby_type? :jruby
=> true 
 > r? :jruby
=> true 
 > jruby?
=> true

define execution scopes:

 > ruby_scope(:jruby){"foo"}
=> "foo"
 > ruby_scope(:rbx){"foo"}
=> nil

Examples

Run the examples with different runtimes, jruby for example:

rvm use jruby
ruby examples/ex.rb

TODO

  • improve me!
  • more docs
  • more todos