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.
28 29 30 |
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 28 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.
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.
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.
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.
96 97 98 |
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 96 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.
18 19 20 |
# File 'lib/convenient_service/dependencies/queries/ruby.rb', line 18 def version @version ||= Version.new(::RUBY_VERSION) end |