Class: VimGet::Commands::SyncCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- VimGet::Commands::SyncCommand
- Defined in:
- lib/vimget/commands/sync_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 ⇒ SyncCommand
constructor
A new instance of SyncCommand.
Methods inherited from BaseCommand
#arguments, #invoke, #show_help, #usage
Constructor Details
#initialize ⇒ SyncCommand
Returns a new instance of SyncCommand.
22 23 24 |
# File 'lib/vimget/commands/sync_command.rb', line 22 def initialize super('sync', 'Sync with vim site') end |
Instance Method Details
#execute ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/vimget/commands/sync_command.rb', line 26 def execute puts "Syncing..." db = VimGet.db db.search().each do |s| puts "-> sync #{s.name}.." new_script = VimGet::parse_script_page(s.sid) new_script.installed = s.installed db.update(new_script) end end |