Sha256: 12d9927cc03ac6c58dc35f146f7a453b7e52c55145a95781aa66f61d31905648
Contents?: true
Size: 685 Bytes
Versions: 17
Compression:
Stored size: 685 Bytes
Contents
# -*- coding: utf-8 -*- require "magellan/cli/resources" module Magellan module Cli module Resources module Deletable def self.included(klass) klass.module_eval do desc "delete NAME", I18n.t(:delete, scope: [:resources, :common, :cmd], resource_name: resource_name) def delete(name) q = build_query("name" => name).update(default_query) r = get_first_result!(self.class.resource_name, name, "/admin/#{resource_key}.json", q) super("/admin/#{resource_key}/#{r['id']}/delete.json") log_success("OK") end end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems