Module: RubyEngine
- Defined in:
- lib/ruby_engine.rb
Constant Summary collapse
- VERSION =
'1.0.1'
Class Method Summary collapse
- .cardinal? ⇒ Boolean (also: parrot?, perl?)
- .ironruby? ⇒ Boolean (also: iron_ruby?)
- .is?(what) ⇒ Boolean (also: is)
- .jruby? ⇒ Boolean (also: java?)
-
.mri? ⇒ Boolean
(also: official_ruby?, ruby?)
ask methods.
- .ree? ⇒ Boolean (also: enterprise?)
- .rubinius? ⇒ Boolean (also: rbx?)
- .to_s ⇒ Object (also: inspect)
Class Method Details
.cardinal? ⇒ Boolean Also known as: parrot?, perl?
60 61 62 |
# File 'lib/ruby_engine.rb', line 60 def cardinal? RubyEngine.is? 'cardinal' end |
.ironruby? ⇒ Boolean Also known as: iron_ruby?
55 56 57 |
# File 'lib/ruby_engine.rb', line 55 def ironruby? RubyEngine.is? 'ironruby' end |
.is?(what) ⇒ Boolean Also known as: is
22 23 24 |
# File 'lib/ruby_engine.rb', line 22 def is?(what) what === @interpreter end |
.jruby? ⇒ Boolean Also known as: java?
40 41 42 |
# File 'lib/ruby_engine.rb', line 40 def jruby? RubyEngine.is? 'jruby' end |
.mri? ⇒ Boolean Also known as: official_ruby?, ruby?
ask methods
34 35 36 |
# File 'lib/ruby_engine.rb', line 34 def mri? RubyEngine.is? 'ruby' end |
.ree? ⇒ Boolean Also known as: enterprise?
50 51 52 |
# File 'lib/ruby_engine.rb', line 50 def ree? RubyEngine.is? 'ree' end |
.rubinius? ⇒ Boolean Also known as: rbx?
45 46 47 |
# File 'lib/ruby_engine.rb', line 45 def rubinius? RubyEngine.is? 'rbx' end |
.to_s ⇒ Object Also known as: inspect
27 28 29 |
# File 'lib/ruby_engine.rb', line 27 def to_s @interpreter.to_s end |