Class: Dude::ProjectManagement::Trello::FetchCurrentTask

Inherits:
Object
  • Object
show all
Defined in:
lib/dude/project_management/trello/fetch_current_task.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, id:) ⇒ FetchCurrentTask

Returns a new instance of FetchCurrentTask.



7
8
9
10
# File 'lib/dude/project_management/trello/fetch_current_task.rb', line 7

def initialize(client, id:)
  @client = client
  @id = id
end

Instance Method Details

#callObject



12
13
14
15
# File 'lib/dude/project_management/trello/fetch_current_task.rb', line 12

def call
  response = client.get("/1/boards/#{Dude::SETTINGS.dig(:jira, :board_id)}/cards/#{id}")
  create_issue JSON.parse(response.body)
end