Class: Datagraph::Command::Clear

Inherits:
Datagraph::Command show all
Defined in:
lib/datagraph/command/clear.rb

Overview

Deletes all data from a repository.

Instance Method Summary (collapse)

Methods inherited from Datagraph::Command

#basename, #parse_repository_specs, #parse_resource_specs, #validate_repository_specs, #validate_resource_specs

Methods included from Datagraph::Client

rpc

Instance Method Details

- execute(*repository_specs)

This method returns an undefined value.

Parameters:

  • (Array<String>) repository_specs


9
10
11
12
13
14
15
# File 'lib/datagraph/command/clear.rb', line 9

def execute(*repository_specs)
  repositories = validate_repository_specs(repository_specs)
  repositories.each do |repository|
    process = repository.clear!
    puts "Repository #{repository.url} successfully cleared." if $VERBOSE
  end
end