Module: Celery::EndpointMethods::InstanceMethods
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
60 61 62 63 |
# File 'lib/celery/endpoint_methods.rb', line 60 def destroy response = HTTParty.delete("#{self.class.endpoint_path}/#{self.id}?#{self.class.}") return response['status'] end |
#update(attrs = {}) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/celery/endpoint_methods.rb', line 48 def update(attrs={}) update_local_object(attrs) response = HTTParty.put( "#{self.class.endpoint_path}/#{self.id}?#{self.class.}", body: { self.class.object_root => attrs }.to_json, headers: { 'Content-Type' => 'application/json' } ) return true if response[self.class.object_root] end |