Class: ConvenientService::Dependencies::Queries::Ruby Private

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/dependencies/queries/ruby.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.engineString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)


28
29
30
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 28

def engine
  ::RUBY_ENGINE.to_s
end

.engine_versionConvenientService::Dependencies::Queries::Version

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



47
48
49
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 47

def engine_version
  @engine_version ||= Version.new(::RUBY_ENGINE_VERSION)
end

.jruby?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns ‘true` when JRuby, `false` otherwise.

Returns:

  • (Boolean)

See Also:



82
83
84
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 82

def jruby?
  ::RUBY_PLATFORM.to_s.match?(/java/)
end

.mri?Boolean Also known as: ruby?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns ‘true` when MRI, `false` otherwise.

Returns:

  • (Boolean)

See Also:



62
63
64
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 62

def mri?
  ::RUBY_ENGINE.to_s == "ruby"
end

.truffleruby?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns ‘true` when TruffleRuby, `false` otherwise.

Returns:

  • (Boolean)


96
97
98
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 96

def truffleruby?
  ::RUBY_ENGINE.to_s.match?(/truffleruby/)
end

.versionConvenientService::Dependencies::Queries::Version

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
19
20
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 18

def version
  @version ||= Version.new(::RUBY_VERSION)
end