Sha256: 51dcbb6afb15413fe3390797fc80108564da471ebb799690b598ff431d14dc0b
Contents?: true
Size: 935 Bytes
Versions: 2
Compression:
Stored size: 935 Bytes
Contents
module Hawkei class APIOperation ## # == Delete a resource for the API # module Delete module ClassMethods ## # Delete an API Resource # # @param [String] id for the request # @param [Hash] Additional options for the request # # @return [Hawkei::Object] response from the API def delete(id, options = {}) response = request(:delete, "#{resource_path}/#{id}", options) initialize_from(response) end end ## # Delete an API Resources # # @param [Hash] Additional options for the request # # @return [Hawkei::Object] response from the API def destroy(options = {}) response = request(:delete, "#{resource_path}/#{id}", {}, options) update_from(response) end def self.included(base) base.extend(ClassMethods) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hawkei-1.1.0 | lib/hawkei/api_operation/delete.rb |
hawkei-1.0.0 | lib/hawkei/api_operation/delete.rb |