Class: Ace::Handbook::CLI::Commands::Sync
- Inherits:
-
Support::Cli::Command
- Object
- Support::Cli::Command
- Ace::Handbook::CLI::Commands::Sync
- Includes:
- Support::Cli::Base
- Defined in:
- lib/ace/handbook/cli/commands/sync.rb
Instance Method Summary collapse
- #call(provider: nil, quiet: false) ⇒ Object
-
#initialize(syncer: nil) ⇒ Sync
constructor
A new instance of Sync.
Constructor Details
Instance Method Details
#call(provider: nil, quiet: false) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ace/handbook/cli/commands/sync.rb', line 20 def call(provider: nil, quiet: false, **) results = @syncer.sync(provider: provider) return if quiet results.each do |result| puts "synced #{result[:provider]} -> #{result[:relative_output_dir]} " \ "(#{result[:projected_skills]} skills, #{result[:updated_files]} updated, " \ "#{result[:removed_entries]} removed)" end print_inventory_summary(results) rescue => e raise Ace::Support::Cli::Error.new(e.) end |