Module: RubyEngine

Defined in:
lib/zucker/engine.rb

Class Method Summary collapse

Class Method Details

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

Returns:

  • (Boolean)


61
62
63
# File 'lib/zucker/engine.rb', line 61

def cardinal?
  RubyEngine.is? 'cardinal'
end

.ironruby?Boolean Also known as: iron_ruby?

Returns:

  • (Boolean)


56
57
58
# File 'lib/zucker/engine.rb', line 56

def ironruby?
  RubyEngine.is? 'ironruby'
end

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

Returns:

  • (Boolean)


24
25
26
# File 'lib/zucker/engine.rb', line 24

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

.jruby?Boolean Also known as: java?

Returns:

  • (Boolean)


41
42
43
# File 'lib/zucker/engine.rb', line 41

def jruby?
  RubyEngine.is? 'jruby'
end

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

ask methods

Returns:

  • (Boolean)


35
36
37
# File 'lib/zucker/engine.rb', line 35

def mri?
  RubyEngine.is? 'mri'
end

.ree?Boolean Also known as: enterprise?

Returns:

  • (Boolean)


51
52
53
# File 'lib/zucker/engine.rb', line 51

def ree?
  RubyEngine.is? 'ree'
end

.rubinius?Boolean Also known as: rbx?

Returns:

  • (Boolean)


46
47
48
# File 'lib/zucker/engine.rb', line 46

def rubinius?
  RubyEngine.is? 'rbx'
end

.to_sObject



29
30
31
# File 'lib/zucker/engine.rb', line 29

def to_s
  @interpreter.to_s
end