Module: ConfigStore::NamespaceClientMethods
- Included in:
- Client
- Defined in:
- lib/configstore/clients/namespace_client_methods.rb
Instance Method Summary collapse
- #create_namespace(namespace) ⇒ Object
- #delete_namespace(namespace_uuid) ⇒ Object
- #get_namespace(namespace_uuid) ⇒ Object
- #list_namespaces ⇒ Object
- #update_namespace(namespace_uuid, namespace) ⇒ Object
Instance Method Details
#create_namespace(namespace) ⇒ Object
14 15 16 |
# File 'lib/configstore/clients/namespace_client_methods.rb', line 14 def create_namespace(namespace) return ConfigStore::Namespace.from_api_hash(@api.create_namespace(namespace.to_api_hash)) end |
#delete_namespace(namespace_uuid) ⇒ Object
22 23 24 |
# File 'lib/configstore/clients/namespace_client_methods.rb', line 22 def delete_namespace(namespace_uuid) return @api.delete_namespace(namespace_uuid) end |
#get_namespace(namespace_uuid) ⇒ Object
10 11 12 |
# File 'lib/configstore/clients/namespace_client_methods.rb', line 10 def get_namespace(namespace_uuid) return ConfigStore::Namespace.from_api_hash(@api.get_namespace(namespace_uuid)) end |
#list_namespaces ⇒ Object
4 5 6 7 8 |
# File 'lib/configstore/clients/namespace_client_methods.rb', line 4 def list_namespaces return @api.list_namespaces.map do |raw_namespace| next(ConfigStore::Namespace.from_api_hash(raw_namespace)) end end |
#update_namespace(namespace_uuid, namespace) ⇒ Object
18 19 20 |
# File 'lib/configstore/clients/namespace_client_methods.rb', line 18 def update_namespace(namespace_uuid, namespace) return ConfigStore::Namespace.from_api_hash(@api.update_namespace(namespace_uuid, namespace.to_api_hash)) end |