Class: Gem::DependencyInstaller

Inherits:
Object
  • Object
show all
Defined in:
lib/gel/compatibility/rubygems.rb

Instance Method Summary collapse

Instance Method Details

#install(name, requirement = nil) ⇒ Object



77
78
79
80
81
82
83
84
85
86
# File 'lib/gel/compatibility/rubygems.rb', line 77

def install(name, requirement = nil)
  require_relative "../catalog"
  require_relative "../work_pool"

  Gel::WorkPool.new(2) do |work_pool|
    catalog = Gel::Catalog.new("https://rubygems.org", work_pool: work_pool)

    return Gel::Environment.install_gem([catalog], name, requirement)
  end
end