Sha256: ef787af604c6034c321aa110e6e153406347461a3a9d788d700bbb3aec87916c
Contents?: true
Size: 477 Bytes
Versions: 12
Compression:
Stored size: 477 Bytes
Contents
# encoding: utf-8 module Doggy class CLI::Delete def run(ids) Doggy::Model.all_local_resources.each do |resource| next unless ids.include?(resource.id.to_s) Doggy.ui.say("Deleting #{resource.path}, with id #{resource.id}") resp = resource.destroy if resp['errors'] Doggy.ui.error("Could not delete. Error: #{resp['errors']}. Skipping") else resource.destroy_local end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems