class Dude::Commands::Track
Attributes
id[R]
Public Instance Methods
call(id:)
click to toggle source
# File lib/dude/commands/track.rb, line 12 def call(id:) @id = id Dude::Toggl::StartTimeEntry.new.call(task_title: task_title, project: Dude::SETTINGS.dig(:toggl, :project_name)) end
Private Instance Methods
task_title()
click to toggle source
# File lib/dude/commands/track.rb, line 21 def task_title client = ProjectManagement::Client.new issue_title = client.get_task_name_by_id(id) Dude::SETTINGS.dig(:toggl, :task_format).sub(/{issue_id}/, id).sub(/{issue_title}/, issue_title) end