Module: Monkey::Engine
Overview
Makes sure we always have RUBY_ENGINE, RUBY_ENGINE_VERSION and RUBY_DESCRIPTION
Class Method Summary collapse
- .ironruby? ⇒ Boolean
- .jruby? ⇒ Boolean
- .macruby? ⇒ Boolean
- .mri? ⇒ Boolean
- .rbx? ⇒ Boolean
- .rubinius? ⇒ Boolean
- .ruby_engine(pretty = true) ⇒ Object
Class Method Details
.ironruby? ⇒ Boolean
61 62 63 |
# File 'lib/monkey/engine.rb', line 61 def ironruby? RUBY_ENGINE == "ironruby" end |
.jruby? ⇒ Boolean
41 42 43 |
# File 'lib/monkey/engine.rb', line 41 def jruby? RUBY_ENGINE == "jruby" end |
.macruby? ⇒ Boolean
67 68 69 |
# File 'lib/monkey/engine.rb', line 67 def macruby? RUBY_ENGINE == "macruby" end |
.mri? ⇒ Boolean
47 48 49 |
# File 'lib/monkey/engine.rb', line 47 def mri? RUBY_ENGINE == "ruby" end |
.rbx? ⇒ Boolean
53 54 55 |
# File 'lib/monkey/engine.rb', line 53 def rbx? RUBY_ENGINE == "rbx" end |
.rubinius? ⇒ Boolean
57 58 59 |
# File 'lib/monkey/engine.rb', line 57 def rbx? RUBY_ENGINE == "rbx" end |
.ruby_engine(pretty = true) ⇒ Object
73 74 75 76 77 78 79 80 |
# File 'lib/monkey/engine.rb', line 73 def ruby_engine(pretty = true) return RUBY_ENGINE unless pretty case RUBY_ENGINE when "ruby" then "CRuby" when "rbx" then "Rubinius" when /ruby$/ then RUBY_ENGINE.capitalize.gsub("ruby", "Ruby") end end |