Class: Datagraph::Command::Register

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

Overview

Registers a new user account.

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(account_name, password = nil)

This method returns an undefined value.

Parameters:

  • (String) account_name
  • (String) password (defaults to: nil)


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

def execute(, password = nil)
  password ||= '' # FIXME
   = Datagraph::Account.register!(, :password => password)
  puts "Account #{.url} successfully registered." if $VERBOSE
end