Class: Reedb::MetaVault
- Inherits:
-
Object
- Object
- Reedb::MetaVault
- 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
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#size ⇒ Object
Returns the value of attribute size.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#includes?(name, path) ⇒ Boolean
Used to compare vaults.
-
#initialize(name, path, size, uuid) ⇒ MetaVault
constructor
A new instance of MetaVault.
- #to_s ⇒ Object
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
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/reedb/utils/meta_vault.rb', line 14 def name @name end |
#path ⇒ Object
Returns the value of attribute path.
14 15 16 |
# File 'lib/reedb/utils/meta_vault.rb', line 14 def path @path end |
#size ⇒ Object
Returns the value of attribute size.
14 15 16 |
# File 'lib/reedb/utils/meta_vault.rb', line 14 def size @size end |
#uuid ⇒ Object
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
24 |
# File 'lib/reedb/utils/meta_vault.rb', line 24 def includes?(name) return (@name == name) end |
#to_s ⇒ Object
26 |
# File 'lib/reedb/utils/meta_vault.rb', line 26 def to_s() return "'#{@name}'@'#{@path}', size: #{@size}" end |