Class: DirNode

Inherits:
Object
  • Object
show all
Defined in:
lib/storage_visualizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent_in, dir_name_in, dir_short_in, size_gb_in) ⇒ DirNode

Returns a new instance of DirNode.



35
36
37
38
39
40
41
# File 'lib/storage_visualizer.rb', line 35

def initialize(parent_in, dir_name_in, dir_short_in, size_gb_in)
  self.parent = parent_in
  self.dir_name = dir_name_in
  self.dir_short = dir_short_in
  self.size_gb = size_gb_in
  self.children = []
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



33
34
35
# File 'lib/storage_visualizer.rb', line 33

def children
  @children
end

#dir_nameObject

Returns the value of attribute dir_name.



30
31
32
# File 'lib/storage_visualizer.rb', line 30

def dir_name
  @dir_name
end

#dir_shortObject

Returns the value of attribute dir_short.



31
32
33
# File 'lib/storage_visualizer.rb', line 31

def dir_short
  @dir_short
end

#parentObject

Returns the value of attribute parent.



29
30
31
# File 'lib/storage_visualizer.rb', line 29

def parent
  @parent
end

#size_gbObject

Returns the value of attribute size_gb.



32
33
34
# File 'lib/storage_visualizer.rb', line 32

def size_gb
  @size_gb
end