Class: Jira::Command::Comment::Delete
- Defined in:
- lib/jira/commands/comment/delete.rb
Instance Attribute Summary collapse
-
#ticket ⇒ Object
Returns the value of attribute ticket.
Instance Method Summary collapse
-
#initialize(ticket) ⇒ Delete
constructor
A new instance of Delete.
- #run ⇒ Object
Constructor Details
#initialize(ticket) ⇒ Delete
Returns a new instance of Delete.
17 18 19 |
# File 'lib/jira/commands/comment/delete.rb', line 17 def initialize(ticket) self.ticket = ticket end |
Instance Attribute Details
#ticket ⇒ Object
Returns the value of attribute ticket.
15 16 17 |
# File 'lib/jira/commands/comment/delete.rb', line 15 def ticket @ticket end |
Instance Method Details
#run ⇒ Object
21 22 23 24 25 26 |
# File 'lib/jira/commands/comment/delete.rb', line 21 def run return unless comments? api.delete endpoint, success: on_success, failure: on_failure end |