Module: RubyEngine

Defined in:
lib/ruby_engine.rb,
lib/ruby_engine/version.rb

Constant Summary collapse

VERSION =

ruby_engine version

"1.0.0"

Class Method Summary collapse

Class Method Details

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

Returns:

  • (Boolean)


58
59
60
# File 'lib/ruby_engine.rb', line 58

def cardinal?
  RubyEngine.is? 'cardinal'
end

.ironruby?Boolean Also known as: iron_ruby?

Returns:

  • (Boolean)


53
54
55
# File 'lib/ruby_engine.rb', line 53

def ironruby?
  RubyEngine.is? 'ironruby'
end

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

Returns:

  • (Boolean)


20
21
22
# File 'lib/ruby_engine.rb', line 20

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

.jruby?Boolean Also known as: java?

Returns:

  • (Boolean)


38
39
40
# File 'lib/ruby_engine.rb', line 38

def jruby?
  RubyEngine.is? 'jruby'
end

.mri?Boolean Also known as: official_ruby?, ruby?

ask methods

Returns:

  • (Boolean)


32
33
34
# File 'lib/ruby_engine.rb', line 32

def mri?
  RubyEngine.is? 'mri'
end

.ree?Boolean Also known as: enterprise?

Returns:

  • (Boolean)


48
49
50
# File 'lib/ruby_engine.rb', line 48

def ree?
  RubyEngine.is? 'ree'
end

.rubinius?Boolean Also known as: rbx?

Returns:

  • (Boolean)


43
44
45
# File 'lib/ruby_engine.rb', line 43

def rubinius?
  RubyEngine.is? 'rbx'
end

.to_sObject Also known as: inspect



25
26
27
# File 'lib/ruby_engine.rb', line 25

def to_s
  @interpreter.to_s
end