Class: GradesFirst::TaskAddCommand
- Inherits:
-
TaskCommand
- Object
- Command
- TaskCommand
- GradesFirst::TaskAddCommand
- Defined in:
- lib/gradesfirst/task_add_command.rb
Overview
Implementation of a Thor command for adding tasks to PivotalTracker stories.
Class Method Summary collapse
-
.description ⇒ Object
Description of the “gf task add” Thor command that will be used in the commandline help.
Instance Method Summary collapse
-
#execute(description) ⇒ Object
Performs the gf task add Thor command.
-
#response ⇒ Object
Generates the command line output response.
Class Method Details
.description ⇒ Object
Description of the “gf task add” Thor command that will be used in the commandline help.
9 10 11 |
# File 'lib/gradesfirst/task_add_command.rb', line 9 def self.description 'Add a task to a PivotalTracker story.' end |
Instance Method Details
#execute(description) ⇒ Object
Performs the gf task add Thor command.
14 15 16 17 18 19 |
# File 'lib/gradesfirst/task_add_command.rb', line 14 def execute(description) @story = current_story if @story @success = task_add(@story, description) end end |
#response ⇒ Object
Generates the command line output response. The output of the task add command is a completion status message which may be followed by the new list of tasks if the task was added successfully.
24 25 26 |
# File 'lib/gradesfirst/task_add_command.rb', line 24 def response task_action_response(@story, @success) end |