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)


33
34
35
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 33

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.



52
53
54
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 52

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:



87
88
89
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 87

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:



67
68
69
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 67

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)


101
102
103
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 101

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.



23
24
25
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 23

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