Sha256: 62b0296fbcd7f6ae8bfcb77440b9782bf7a060065bc6b4b14cab499e006b9c96
Contents?: true
Size: 418 Bytes
Versions: 5
Compression:
Stored size: 418 Bytes
Contents
module HabiticaCli # Responsible for completing tasks module Commands def self.do(env, cache_ids) items = cache_ids.map { |id| env.cache.get(id) } items.each do |item| response = env.api.post("tasks/#{item['id']}/score/up") if response.success? puts "Completed: #{item['text']}" else puts "Error #{response.body}" end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems