Class: Terjira::ProjectCLI

Inherits:
BaseCLI
  • Object
show all
Defined in:
lib/terjira/project_cli.rb

Constant Summary

Constants included from IssuePresenter

IssuePresenter::COMMENTS_SIZE

Constants included from OptionSupportable

OptionSupportable::OPTION_TO_SELECTOR

Instance Method Summary collapse

Methods inherited from BaseCLI

banner, subcommand_prefix

Methods included from SprintPresenter

#colorize_sprint_state, #render_sprint_detail, #render_sprints_summary, #sort_sprint_by_state, #summarise_sprint

Methods included from BoardPresenter

#render_boards_summary

Methods included from ProjectPresenter

#redner_project_detail, #render_components_and_versions, #render_projects_summary

Methods included from IssuePresenter

#comments_template, #issue_detail_template, #render_divided_issues_by_status, #render_issue_detail, #render_issues, #summarise_issue

Methods included from CommonPresenter

#dim_none, #formatted_date, #insert_new_line, #pastel, #render, #screen_width, #username

Methods included from OptionSupportable

included, #resource_store, #suggest_options, #suggest_related_value_options

Instance Method Details

#listObject



20
21
22
23
# File 'lib/terjira/project_cli.rb', line 20

def list
  projects = Client::Project.all
  render_projects_summary(projects)
end

#show(project_key = nil) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/terjira/project_cli.rb', line 8

def show(project_key = nil)
  if project_key.nil?
    project = select_project
    project_key = project.key_value
  end

  project = Client::Project.find(project_key)
  redner_project_detail(project)
end