Class: DTK::Network::Client::Command::DeleteNamespace

Inherits:
DTK::Network::Client::Command show all
Defined in:
lib/client/command/delete_namespace.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DTK::Network::Client::Command

wrap_command

Methods included from RestWrapper

#rest_delete, #rest_get, #rest_post

Methods included from Client::PermissionsUtil

#validate_permissions!

Methods included from Util::Tar

#gzip, #tar, #ungzip, #untar

Constructor Details

#initialize(namespace, options = {}) ⇒ DeleteNamespace

Returns a new instance of DeleteNamespace.



4
5
6
# File 'lib/client/command/delete_namespace.rb', line 4

def initialize(namespace, options = {})
  @namespace = namespace
end

Class Method Details

.run(namespace, opts = {}) ⇒ Object



8
9
10
# File 'lib/client/command/delete_namespace.rb', line 8

def self.run(namespace, opts = {})
  new(namespace, opts).delete_namespace
end

Instance Method Details

#delete_namespaceObject



12
13
14
15
# File 'lib/client/command/delete_namespace.rb', line 12

def delete_namespace
  rest_delete("groups/#{@namespace}", { name: @namespace, reference: 'namespace' })
  nil
end