Module: Platform::Engine

Defined in:
lib/hanami/devtools/integration/platform/engine.rb

Overview

Detect current Ruby engine: MRI or JRuby

Since:

  • 0.2.0

Class Method Summary collapse

Class Method Details

.currentObject

Since:

  • 0.2.0



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

Returns:

  • (Boolean)

Since:

  • 0.2.0



10
11
12
# File 'lib/hanami/devtools/integration/platform/engine.rb', line 10

def self.engine?(name)
  current == name
end