Class: BundleUpdateInteractive::Latest::Updater
- Defined in:
- lib/bundle_update_interactive/latest/updater.rb
Instance Method Summary collapse
- #apply_updates ⇒ Object
-
#initialize(editor: GemfileEditor.new, **kwargs) ⇒ Updater
constructor
A new instance of Updater.
- #modified_gemfile? ⇒ Boolean
Methods inherited from Updater
Constructor Details
#initialize(editor: GemfileEditor.new, **kwargs) ⇒ Updater
Returns a new instance of Updater.
9 10 11 12 13 |
# File 'lib/bundle_update_interactive/latest/updater.rb', line 9 def initialize(editor: GemfileEditor.new, **kwargs) super(**kwargs) @modified_gemfile = false @editor = editor end |
Instance Method Details
#apply_updates ⇒ Object
15 16 17 18 19 20 |
# File 'lib/bundle_update_interactive/latest/updater.rb', line 15 def apply_updates(*, **) result = editor.with_relaxed_gemfile { super } @modified_gemfile = editor.shift_gemfile BundlerCommands.lock result end |
#modified_gemfile? ⇒ Boolean
22 23 24 |
# File 'lib/bundle_update_interactive/latest/updater.rb', line 22 def modified_gemfile? @modified_gemfile end |