Class: WatchTower::FileTree
- Inherits:
-
Object
- Object
- WatchTower::FileTree
- Defined in:
- lib/watch_tower/file_tree.rb
Overview
This class is used by the server to provided a FileTree representation of the files and their elapsed time
Instance Attribute Summary collapse
-
#base_path ⇒ Object
readonly
Returns the value of attribute base_path.
-
#elapsed_time ⇒ Object
readonly
Returns the value of attribute elapsed_time.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#nested_tree ⇒ Object
readonly
Returns the value of attribute nested_tree.
Instance Method Summary collapse
-
#initialize(base_path, files) ⇒ FileTree
constructor
Initialize.
Constructor Details
#initialize(base_path, files) ⇒ FileTree
Initialize
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/watch_tower/file_tree.rb', line 16 def initialize(base_path, files) # Init with args @base_path = base_path @all_files = remove_base_path_from_files(@base_path, files) # Init with defaults @elapsed_time = 0 @files = Array.new @nested_tree = Hash.new # Process the tree process end |
Instance Attribute Details
#base_path ⇒ Object (readonly)
Returns the value of attribute base_path.
8 9 10 |
# File 'lib/watch_tower/file_tree.rb', line 8 def base_path @base_path end |
#elapsed_time ⇒ Object (readonly)
Returns the value of attribute elapsed_time.
8 9 10 |
# File 'lib/watch_tower/file_tree.rb', line 8 def elapsed_time @elapsed_time end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
8 9 10 |
# File 'lib/watch_tower/file_tree.rb', line 8 def files @files end |
#nested_tree ⇒ Object (readonly)
Returns the value of attribute nested_tree.
8 9 10 |
# File 'lib/watch_tower/file_tree.rb', line 8 def nested_tree @nested_tree end |