Sha256: 0a9610c7fd77c663d1a632269e00e555388587937b7a4862bc69a518b8574f4d
Contents?: true
Size: 417 Bytes
Versions: 1
Compression:
Stored size: 417 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("user/tasks/#{item['id']}/up") if response.success? puts "Completed: #{item['text']}" else puts "Error #{response.body}" end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
habitica_cli-0.0.1 | lib/habitica_cli/commands/do.rb |