Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Gem::DependencyInstaller.new
() -> ::Gem::DependencyInstaller
new(options = {})
lib/rubygems/dependency_installer.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/dependency_installer.rb, line 72
def initialize(options = {})
@only_install_dir = !options[:install_dir].nil?
@install_dir = options[:install_dir] || Gem.dir
@build_root = options[:build_root]
options = DEFAULT_OPTIONS.merge options
@bin_dir = options[:bin_dir]
@dev_shallow = options[:dev_shallow]
@development = options[:development]
@document = options[:document]
@domain = options[:domain]
@env_shebang = options[:env_shebang]
@force = options[:force]
@format_executable = options[:format_executable]
@ignore_dependencies = options[:ignore_dependencies]
@prerelease = options[:prerelease]
@security_policy = options[:security_policy]
@user_install = options[:user_install]
@wrappers = options[:wrappers]
@build_args = options[:build_args]
@build_jobs = options[:build_jobs]
@build_docs_in_background = options[:build_docs_in_background]
@dir_mode = options[:dir_mode]
@data_mode = options[:data_mode]
@prog_mode = options[:prog_mode]
@build_extension = options[:build_extension]
@install_plugin = options[:install_plugin]
@cooldown = Gem::Cooldown.from_options options
@cooldown_skipped = []
# Indicates that we should not try to update any deps unless
# we absolutely must.
@minimal_deps = options[:minimal_deps]
@available = nil
@installed_gems = []
@toplevel_specs = nil
@cache_dir = options[:cache_dir] || @install_dir
@errors = []
end
Creates a new installer instance.
Options are:
- :cache_dir
-
Alternate repository path to store .gem files in.
- :domain
-
:local, :remote, or :both. :local only searches gems in the current directory. :remote searches only gems in
Gem::sources. :both searches both. - :env_shebang
-
See
Gem::Installer::new. - :force
- :format_executable
-
See Gem::Installer#initialize.
- :ignore_dependencies
-
Don’t install any dependencies.
- :install_dir
- :prerelease
-
Allow prerelease versions. See
install. - :security_policy
-
See
Gem::Installer::newandGem::Security. - :user_install
- :wrappers
- :build_args