Class: WatchTower::Server::Presenters::ProjectPresenter
- Inherits:
-
ApplicationPresenter
- Object
- ApplicationPresenter
- WatchTower::Server::Presenters::ProjectPresenter
- Defined in:
- lib/watch_tower/server/presenters/project_presenter.rb
Instance Attribute Summary
Attributes inherited from ApplicationPresenter
Instance Method Summary collapse
-
#file_tree(files) ⇒ String
Return a file tree representation of a bunch of files.
Methods inherited from ApplicationPresenter
#approximate_elapsed, #elapsed, #initialize, #method_missing, presents
Constructor Details
This class inherits a constructor from WatchTower::Server::Presenters::ApplicationPresenter
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class WatchTower::Server::Presenters::ApplicationPresenter
Instance Method Details
#file_tree(files) ⇒ String
Return a file tree representation of a bunch of files
11 12 13 14 15 16 |
# File 'lib/watch_tower/server/presenters/project_presenter.rb', line 11 def file_tree(files) # Create a FileTree file_tree = FileTree.new(files.first.project.path, files) # Parse and return the tree parse_file_tree(file_tree, true) end |