lib/stir/rest/endpoints.rb in stir-2.1.1 vs lib/stir/rest/endpoints.rb in stir-2.2.1
- old
+ new
@@ -32,9 +32,13 @@
end
def delete(name, &block)
endpoint(name, :delete, &block)
end
+
+ def patch(name, &block)
+ endpoint(name, :patch, &block)
+ end
private
def endpoint(name, method, &block)
send(:define_method, name) do |*args|
@response = HTTParty.send(method, URI.escape(yield.interpolate(args.first)), merge_configs(args.flatten.first))