Class: Bundler::Interactive::Update
- Inherits:
-
Object
- Object
- Bundler::Interactive::Update
- Defined in:
- lib/bundler/interactive/update.rb
Instance Attribute Summary collapse
-
#gems ⇒ Object
readonly
Returns the value of attribute gems.
Instance Method Summary collapse
-
#initialize(gems) ⇒ Update
constructor
A new instance of Update.
- #update! ⇒ Object
Constructor Details
#initialize(gems) ⇒ Update
Returns a new instance of Update.
8 9 10 |
# File 'lib/bundler/interactive/update.rb', line 8 def initialize(gems) @gems = gems end |
Instance Attribute Details
#gems ⇒ Object (readonly)
Returns the value of attribute gems.
6 7 8 |
# File 'lib/bundler/interactive/update.rb', line 6 def gems @gems end |
Instance Method Details
#update! ⇒ Object
12 13 14 15 16 17 |
# File 'lib/bundler/interactive/update.rb', line 12 def update! puts "Updating #{gems.join(', ')}..." # Update Gemfile? definition = Bundler.definition(gems: gems) Bundler::Installer.install(Bundler.root, definition) end |