Module: RubyEngine

Defined in:
lib/ruby_engine.rb

Constant Summary collapse

VERSION =
'1.0.1'

Class Method Summary collapse

Class Method Details

.cardinal?Boolean Also known as: parrot?, perl?

Returns:

  • (Boolean)


60
61
62
# File 'lib/ruby_engine.rb', line 60

def cardinal?
  RubyEngine.is? 'cardinal'
end

.ironruby?Boolean Also known as: iron_ruby?

Returns:

  • (Boolean)


55
56
57
# File 'lib/ruby_engine.rb', line 55

def ironruby?
  RubyEngine.is? 'ironruby'
end

.is?(what) ⇒ Boolean Also known as: is

Returns:

  • (Boolean)


22
23
24
# File 'lib/ruby_engine.rb', line 22

def is?(what)
  what === @interpreter
end

.jruby?Boolean Also known as: java?

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


34
35
36
# File 'lib/ruby_engine.rb', line 34

def mri?
  RubyEngine.is? 'ruby'
end

.ree?Boolean Also known as: enterprise?

Returns:

  • (Boolean)


50
51
52
# File 'lib/ruby_engine.rb', line 50

def ree?
  RubyEngine.is? 'ree'
end

.rubinius?Boolean Also known as: rbx?

Returns:

  • (Boolean)


45
46
47
# File 'lib/ruby_engine.rb', line 45

def rubinius?
  RubyEngine.is? 'rbx'
end

.to_sObject Also known as: inspect



27
28
29
# File 'lib/ruby_engine.rb', line 27

def to_s
  @interpreter.to_s
end