Class: TM::Commands::CreateComment
- Defined in:
- lib/tm/commands/create_comment.rb
Instance Method Summary collapse
Methods inherited from Command
Constructor Details
This class inherits a constructor from TM::Commands::Command
Instance Method Details
#execute(task_attribute = '', comment_attribute = '') ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/tm/commands/create_comment.rb', line 5 def execute(task_attribute = '', comment_attribute = '') project = @provider_handler.taskmapper.project(@attributes) task_attribute = task_attribute.extend(TM::StringExtensions).to_hash ticket = project.tickets(task_attribute).first comment_attribute = comment_attribute.extend(TM::StringExtensions).to_hash comment = ticket.comment! comment_attribute @formatter.before(comment) @formatter.format(comment) @formatter.after end |