Sha256: 675adcd0e0dd2abb5c1e93033b330ddc61154227305ab48a385f0fc19aaefaf7

Contents?: true

Size: 288 Bytes

Versions: 5

Compression:

Stored size: 288 Bytes

Contents

module HabiticaCli
  # Clear completed tasks
  # to slim down output
  module Commands
    def self.clear(env)
      env.api.post('tasks/clear-completed')
      if response.success?
        puts 'Tasks cleared'
      else
        puts "Error #{response.body}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
habitica_cli-1.0.2 lib/habitica_cli/commands/clear.rb
habitica_cli-1.0.1 lib/habitica_cli/commands/clear.rb
habitica_cli-1.0.0 lib/habitica_cli/commands/clear.rb
habitica_cli-0.1.1 lib/habitica_cli/commands/clear.rb
habitica_cli-0.1.0 lib/habitica_cli/commands/clear.rb