Class: Bundler::CurrentRuby
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/bundler/current_ruby.rb |
Constant Summary
-
KNOWN_MAJOR_VERSIONS =
# File 'lib/bundler/current_ruby.rb', line 24KNOWN_MINOR_VERSIONS.map {|v| v.split(".", 2).first }.uniq.freeze
-
KNOWN_MINOR_VERSIONS =
# File 'lib/bundler/current_ruby.rb', line 12%w[ 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 ].freeze
-
KNOWN_PLATFORMS =
# File 'lib/bundler/current_ruby.rb', line 26%w[ jruby maglev mingw mri mswin mswin64 rbx ruby truffleruby x64_mingw ].freeze
Instance Attribute Summary
- #jruby? ⇒ Boolean readonly
- #maglev? ⇒ Boolean readonly
- #mingw? ⇒ Boolean readonly
- #mri? ⇒ Boolean readonly
- #mswin64? ⇒ Boolean readonly
- #mswin? ⇒ Boolean readonly
- #rbx? ⇒ Boolean readonly
- #ruby? ⇒ Boolean readonly
- #truffleruby? ⇒ Boolean readonly
- #x64_mingw? ⇒ Boolean readonly
Instance Attribute Details
#jruby? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/current_ruby.rb', line 52
def jruby? defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" end
#maglev? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/current_ruby.rb', line 56
def maglev? defined?(RUBY_ENGINE) && RUBY_ENGINE == "maglev" end
#mingw? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/current_ruby.rb', line 72
def mingw? Bundler::WINDOWS && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mingw32" && Bundler.local_platform.cpu != "x64" end
#mri? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/current_ruby.rb', line 44
def mri? !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") end
#mswin64? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/current_ruby.rb', line 68
def mswin64? Bundler::WINDOWS && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mswin64" && Bundler.local_platform.cpu == "x64" end
#mswin? ⇒ Boolean
(readonly)
[ GitHub ]
#rbx? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/current_ruby.rb', line 48
def rbx? ruby? && defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx" end
#ruby? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/current_ruby.rb', line 39
def ruby? !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby") end
#truffleruby? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/current_ruby.rb', line 60
def truffleruby? defined?(RUBY_ENGINE) && RUBY_ENGINE == "truffleruby" end
#x64_mingw? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/bundler/current_ruby.rb', line 76
def x64_mingw? Bundler::WINDOWS && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mingw32" && Bundler.local_platform.cpu == "x64" end