class GradesFirst::TaskListCommand
Implementation of a Thor command for listing tasks related to a story.
Public Class Methods
description()
click to toggle source
Description of the gf task list Thor command that will be used in the command line help.
# File lib/gradesfirst/task_list_command.rb, line 10 def self.description 'List the tasks related to a PivotalTracker story.' end
Public Instance Methods
execute()
click to toggle source
Performs the gf task list Thor command.
# File lib/gradesfirst/task_list_command.rb, line 15 def execute @story = current_story if @story @tasks = get_tasks(@story) end end
response()
click to toggle source
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.
# File lib/gradesfirst/task_list_command.rb, line 25 def response if @tasks.nil? story_error_message else task_list_response(@story, @tasks) end end
Private Instance Methods
story_error_message()
click to toggle source
# File lib/gradesfirst/task_list_command.rb, line 35 def story_error_message 'Tasks cannot be retrieved for this branch.' end