Module: Platform::Engine
- Defined in:
- lib/hanami/devtools/integration/platform/engine.rb
Overview
Detect current Ruby engine: MRI or JRuby
Class Method Summary collapse
Class Method Details
.current ⇒ Object
14 15 16 17 18 |
# File 'lib/hanami/devtools/integration/platform/engine.rb', line 14 def self.current if ruby? then :ruby elsif jruby? then :jruby end end |
.engine?(name) ⇒ Boolean
10 11 12 |
# File 'lib/hanami/devtools/integration/platform/engine.rb', line 10 def self.engine?(name) current == name end |