Method: Reedb::Vault.unscope_vault

Defined in:
lib/reedb.rb

.unscope_vault(uuid) ⇒ Object

Removes a vault from the application scope with a uuid. Closes the vault from the active vault set.

Parameters:

  • uuid (String)

    UUID of a vault (as an ID)



698
699
700
701
702
703
704
705
706
707
708
709
# File 'lib/reedb.rb', line 698

def unscope_vault(uuid)
	unless @@config[:vaults][uuid]
		raise VaultNotScopedError.new, "Vault #{name} not scoped!"
		return nil
	end

	path = @@config[:vaults][uuid][:path]
	DaemonLogger.write("Unscoping vault #{uuid} at #{path}")
	@@active_vaults[uuid].close if @@active_vaults[uuid]
	@@config[:vaults].delete(uuid)
	cache_config
end