Class: Bundler::CLI::Remove

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/cli/remove.rb

Instance Method Summary collapse

Constructor Details

#initialize(gems, options) ⇒ Remove

Returns a new instance of Remove.



5
6
7
8
# File 'lib/bundler/cli/remove.rb', line 5

def initialize(gems, options)
  @gems = gems
  @options = options
end

Instance Method Details

#runObject

Raises:



10
11
12
13
14
15
16
# File 'lib/bundler/cli/remove.rb', line 10

def run
  raise InvalidOption, "Please specify gems to remove." if @gems.empty?

  Injector.remove(@gems, {})

  Installer.install(Bundler.root, Bundler.definition) if @options["install"]
end