Class: Datagraph::Command::Import

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

Overview

Imports data into 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_spec, *urls)

This method returns an undefined value.

Parameters:

  • (String) repository_spec
  • (Array<String>) urls


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

def execute(repository_spec, *urls)
  repository = validate_repository_specs([repository_spec]).first
  urls.each do |url|
    puts "Importing #{url} into #{repository.url}..." if $VERBOSE
    process = repository.import!(url)
  end
end