Class: Dsu::Views::Project::List

Inherits:
BaseListView show all
Defined in:
lib/dsu/views/project/list.rb

Overview

TODO: I18n.

Constant Summary collapse

NO_JUSTIFICATION =
4
PROJECT_JUSTIFICATION =
15 + 10
DEFAULT_JUSTIFICATION =
10 + 10
CURRENT_JUSTIFICATION =
10 + 10
DESCRIPTION_JUSTIFICATION =
10 + 10
DETAIL_HEADER_STRING =
"#{'No.'.ljust(NO_JUSTIFICATION)} " \
"#{'Project'.ljust(PROJECT_JUSTIFICATION)} " \
"#{'Default'.center(DEFAULT_JUSTIFICATION)} " \
"#{'Current'.center(CURRENT_JUSTIFICATION)} " \
"#{'Description'.ljust(DESCRIPTION_JUSTIFICATION)}".freeze

Instance Attribute Summary

Attributes inherited from BaseListView

#presenter

Instance Method Summary collapse

Methods inherited from BaseListView

#initialize

Methods included from Support::ColorThemable

apply_theme, #prompt_with_options

Constructor Details

This class inherits a constructor from Dsu::Views::BaseListView

Instance Method Details

#renderObject



22
23
24
25
26
27
28
# File 'lib/dsu/views/project/list.rb', line 22

def render
  super do
    return display_no_projects if presenter.projects.none?

    display_project_list
  end
end