lib/checkoff/internal/task_hashes.rb in checkoff-0.164.0 vs lib/checkoff/internal/task_hashes.rb in checkoff-0.165.0
- old
+ new
@@ -15,9 +15,20 @@
unwrap_memberships(task_hash)
task_hash['task'] = task.name
task_hash
end
+ # @param task_data [Hash]
+ # @param client [Asana::Client]
+ #
+ # @return [Asana::Resources::Task]
+ def h_to_task(task_data, client:)
+ # copy of task_data without the 'unwrapped' key
+ clean_task_data = task_data.dup
+ clean_task_data.delete('unwrapped')
+ Asana::Resources::Task.new(clean_task_data, client: client)
+ end
+
private
# @param task_hash [Hash]
# @return [void]
def unwrap_custom_fields(task_hash)