Class: Dude::ProjectManagement::Jira::FetchCurrentTask
- Inherits:
-
Object
- Object
- Dude::ProjectManagement::Jira::FetchCurrentTask
- Defined in:
- lib/dude/project_management/jira/fetch_current_task.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(client, id:) ⇒ FetchCurrentTask
constructor
A new instance of FetchCurrentTask.
Constructor Details
#initialize(client, id:) ⇒ FetchCurrentTask
Returns a new instance of FetchCurrentTask.
9 10 11 12 |
# File 'lib/dude/project_management/jira/fetch_current_task.rb', line 9 def initialize(client, id:) @client = client @id = id end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 |
# File 'lib/dude/project_management/jira/fetch_current_task.rb', line 14 def call create_issue(client.Issue.find(id)) rescue JIRA::HTTPError puts "#{'Error:'.red.bold} Task #{id.bold} not found. Try again with correct task ID" end |