Class: Vaulty::VaultTree::Folder
- Inherits:
-
Object
- Object
- Vaulty::VaultTree::Folder
- Defined in:
- lib/vaulty/vault_tree.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(name:, data:, children:) ⇒ Folder
constructor
A new instance of Folder.
Constructor Details
#initialize(name:, data:, children:) ⇒ Folder
Returns a new instance of Folder.
5 6 7 8 9 |
# File 'lib/vaulty/vault_tree.rb', line 5 def initialize(name:, data:, children:) @name = name @data = data @children = children end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
4 5 6 |
# File 'lib/vaulty/vault_tree.rb', line 4 def children @children end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/vaulty/vault_tree.rb', line 4 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/vaulty/vault_tree.rb', line 4 def name @name end |
Instance Method Details
#empty? ⇒ Boolean
11 12 13 |
# File 'lib/vaulty/vault_tree.rb', line 11 def empty? data.empty? && children.empty? end |