Sha256: e8cf3b651c3ce6059b04263c4de5026c134757b0e04a9fb3313a693dc679e6ce

Contents?: true

Size: 736 Bytes

Versions: 13

Compression:

Stored size: 736 Bytes

Contents

require 'lotus/utils/version'

module Lotus
  # Ruby core extentions and Lotus utilities
  #
  # @since 0.1.0
  module Utils
    # @since 0.3.1
    # @api private
    LOTUS_JRUBY = 'java'.freeze

    # @since 0.3.1
    # @api private
    LOTUS_RUBINIUS = 'rbx'.freeze

    # Checks if the current VM is JRuby
    #
    # @return [TrueClass,FalseClass] return if the VM is JRuby or not
    #
    # @since 0.3.1
    # @api private
    def self.jruby?
      RUBY_PLATFORM == LOTUS_JRUBY
    end

    # Checks if the current VM is Rubinius
    #
    # @return [TrueClass,FalseClass] return if the VM is Rubinius or not
    #
    # @since 0.3.1
    # @api private
    def self.rubinius?
      RUBY_ENGINE == LOTUS_RUBINIUS
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
lotus-utils-0.6.1 lib/lotus/utils.rb
lotus-utils-0.6.0 lib/lotus/utils.rb
lotus-utils-0.5.2 lib/lotus/utils.rb
lotus-utils-0.5.1 lib/lotus/utils.rb
lotus-utils-0.5.0 lib/lotus/utils.rb
lotus-utils-0.4.3 lib/lotus/utils.rb
lotus-utils-0.4.2 lib/lotus/utils.rb
lotus-utils-0.4.1 lib/lotus/utils.rb
lotus-utils-0.4.0 lib/lotus/utils.rb
lotus-utils-0.3.5 lib/lotus/utils.rb
lotus-utils-0.3.4 lib/lotus/utils.rb
lotus-utils-0.3.3 lib/lotus/utils.rb
lotus-utils-0.3.2 lib/lotus/utils.rb