Module: RubyEngine
- Defined in:
- lib/ruby_engine.rb
Constant Summary collapse
- VERSION =
'2.0.0'
Class Method Summary collapse
- .is?(what) ⇒ Boolean (also: is)
- .jruby? ⇒ Boolean (also: java?)
- .mri? ⇒ Boolean (also: official_ruby?, ruby?, cruby?)
- .rubinius? ⇒ Boolean (also: rbx?)
- .to_s ⇒ Object (also: inspect)
- .truffleruby? ⇒ Boolean (also: truffle?)
Class Method Details
.is?(what) ⇒ Boolean Also known as: is
9 10 11 |
# File 'lib/ruby_engine.rb', line 9 def is?(what) what === @interpreter end |
.jruby? ⇒ Boolean Also known as: java?
26 27 28 |
# File 'lib/ruby_engine.rb', line 26 def jruby? RubyEngine.is? 'jruby' end |
.mri? ⇒ Boolean Also known as: official_ruby?, ruby?, cruby?
19 20 21 |
# File 'lib/ruby_engine.rb', line 19 def mri? RubyEngine.is? 'ruby' end |
.rubinius? ⇒ Boolean Also known as: rbx?
31 32 33 |
# File 'lib/ruby_engine.rb', line 31 def rubinius? RubyEngine.is? 'rbx' end |
.to_s ⇒ Object Also known as: inspect
14 15 16 |
# File 'lib/ruby_engine.rb', line 14 def to_s @interpreter.to_s end |
.truffleruby? ⇒ Boolean Also known as: truffle?
36 37 38 |
# File 'lib/ruby_engine.rb', line 36 def truffleruby? RubyEngine.is? 'truffleruby' end |