Class: ConvenientService::Dependencies::Queries::Ruby Private
- Inherits:
-
Object
- Object
- ConvenientService::Dependencies::Queries::Ruby
- 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
- .engine ⇒ String private
- .engine_version ⇒ ConvenientService::Dependencies::Queries::Version private
-
.jruby? ⇒ Boolean
private
Returns
true
when JRuby,false
otherwise. -
.mri? ⇒ Boolean
(also: ruby?)
private
Returns
true
when MRI,false
otherwise. -
.truffleruby? ⇒ Boolean
private
Returns
true
when TruffleRuby,false
otherwise. - .version ⇒ ConvenientService::Dependencies::Queries::Version private
Class Method Details
.engine ⇒ String
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.
33 34 35 |
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 33 def engine ::RUBY_ENGINE.to_s end |
.engine_version ⇒ ConvenientService::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.
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.
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.
101 102 103 |
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 101 def truffleruby? ::RUBY_ENGINE.to_s.match?(/truffleruby/) end |
.version ⇒ ConvenientService::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 |