Class: WatchTower::Server::Presenters::ProjectPresenter

Inherits:
ApplicationPresenter show all
Defined in:
lib/watch_tower/server/presenters/project_presenter.rb

Instance Attribute Summary

Attributes inherited from ApplicationPresenter

#model, #template

Instance Method Summary collapse

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

Returns:

  • (String)

    HTML representation of a file tree



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