Class: GradesFirst::TaskListCommand
- Inherits:
-
TaskCommand
- Object
- Command
- TaskCommand
- GradesFirst::TaskListCommand
- Defined in:
- lib/gradesfirst/task_list_command.rb
Overview
Implementation of a Thor command for listing tasks related to a story.
Class Method Summary collapse
-
.description ⇒ Object
Description of the gf task list Thor command that will be used in the command line help.
Instance Method Summary collapse
-
#execute ⇒ Object
Performs the gf task list Thor command.
-
#response ⇒ Object
Generates the comand line output response.
Class Method Details
.description ⇒ Object
Description of the gf task list Thor command that will be used in the command line help.
10 11 12 |
# File 'lib/gradesfirst/task_list_command.rb', line 10 def self.description 'List the tasks related to a PivotalTracker story.' end |
Instance Method Details
#execute ⇒ Object
Performs the gf task list Thor command.
15 16 17 18 19 20 |
# File 'lib/gradesfirst/task_list_command.rb', line 15 def execute @story = current_story if @story @tasks = get_tasks(@story) end end |
#response ⇒ Object
Generates the comand line output response. The output of the task command is a list of the tasks associated with the PivotalTracker story associated with the current branch.
25 26 27 28 29 30 31 |
# File 'lib/gradesfirst/task_list_command.rb', line 25 def response if @tasks.nil? else task_list_response(@story, @tasks) end end |