Class: VimGet::Commands::UpgradeCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- VimGet::Commands::UpgradeCommand
- Defined in:
- lib/vimget/commands/upgrade_command.rb
Constant Summary
Constants inherited from BaseCommand
Instance Attribute Summary
Attributes inherited from BaseCommand
#command, #defaults, #options, #options_group, #program_name, #summary
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ UpgradeCommand
constructor
A new instance of UpgradeCommand.
Methods inherited from BaseCommand
#arguments, #invoke, #show_help, #usage
Constructor Details
#initialize ⇒ UpgradeCommand
Returns a new instance of UpgradeCommand.
22 23 24 |
# File 'lib/vimget/commands/upgrade_command.rb', line 22 def initialize super('upgrade', 'upgrade outdated script(s)') end |
Instance Method Details
#execute ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/vimget/commands/upgrade_command.rb', line 26 def execute outdated_scripts = VimGet.db.outdated_scripts if outdated_scripts.empty? puts "There is no script outdated." return end installer = Installer.new(@options) outdated_scripts.each do |s| installer.upgrade(s) end end |