Class: Dydra::Command::Register

Inherits:
Dydra::Command show all
Defined in:
lib/dydra/command/register.rb

Overview

Registers a new user account.

Instance Method Summary (collapse)

Methods inherited from Dydra::Command

#abort, #basename, #catch_errors, #debug?, #initialize, #parse_repository_specs, #parse_resource_specs, #require_gem!, #stderr, #stdout, #validate_repository_specs, #validate_resource_specs, #verbose?, #wrap_errors

Methods included from Dydra::Client

authenticate!, credentials_file, delete, get, get_json, post, reset!, resource, rpc, setup?

Constructor Details

This class inherits a constructor from Dydra::Command

Instance Method Details

- execute(account_name, password = nil)

This method returns an undefined value.

Parameters:

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


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

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