Class: Reedb::MetaVault

Inherits:
Object
  • Object
show all
Defined in:
lib/reedb/utils/meta_vault.rb

Overview

Handler class to map vaults in the reedb api to a set

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, path, size, uuid) ⇒ MetaVault

Returns a new instance of MetaVault.



16
17
18
19
20
21
# File 'lib/reedb/utils/meta_vault.rb', line 16

def initialize(name, path, size, uuid)
	@name = name
	@path = path
	@size = size
	@uuid = uuid
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/reedb/utils/meta_vault.rb', line 14

def name
  @name
end

#pathObject

Returns the value of attribute path.



14
15
16
# File 'lib/reedb/utils/meta_vault.rb', line 14

def path
  @path
end

#sizeObject

Returns the value of attribute size.



14
15
16
# File 'lib/reedb/utils/meta_vault.rb', line 14

def size
  @size
end

#uuidObject

Returns the value of attribute uuid.



14
15
16
# File 'lib/reedb/utils/meta_vault.rb', line 14

def uuid
  @uuid
end

Instance Method Details

#includes?(name, path) ⇒ Boolean

Used to compare vaults

Returns:

  • (Boolean)


24
# File 'lib/reedb/utils/meta_vault.rb', line 24

def includes?(name) return (@name == name) end

#to_sObject



26
# File 'lib/reedb/utils/meta_vault.rb', line 26

def to_s() return "'#{@name}'@'#{@path}', size: #{@size}" end