Class: DTK::Network::Client::Command::CreateNamespace
- Inherits:
-
DTK::Network::Client::Command
- Object
- DTK::Network::Client::Command
- DTK::Network::Client::Command::CreateNamespace
- Defined in:
- lib/client/command/create_namespace.rb
Class Method Summary collapse
Instance Method Summary collapse
- #create_namespace ⇒ Object
-
#initialize(namespace, options = {}) ⇒ CreateNamespace
constructor
A new instance of CreateNamespace.
Methods inherited from DTK::Network::Client::Command
Methods included from RestWrapper
#rest_delete, #rest_get, #rest_post
Methods included from Client::PermissionsUtil
Methods included from Util::Tar
Constructor Details
#initialize(namespace, options = {}) ⇒ CreateNamespace
Returns a new instance of CreateNamespace.
4 5 6 |
# File 'lib/client/command/create_namespace.rb', line 4 def initialize(namespace, = {}) @namespace = namespace end |
Class Method Details
.run(namespace, opts = {}) ⇒ Object
8 9 10 |
# File 'lib/client/command/create_namespace.rb', line 8 def self.run(namespace, opts = {}) new(namespace, opts).create_namespace end |
Instance Method Details
#create_namespace ⇒ Object
12 13 14 15 |
# File 'lib/client/command/create_namespace.rb', line 12 def create_namespace rest_post("groups", { name: @namespace, reference: 'namespace' }) nil end |