Module: Pixmatch::Client::Delete
- Included in:
- Pixmatch::Client
- Defined in:
- lib/pixmatch/client/delete.rb
Instance Method Summary collapse
-
#delete(filenames) ⇒ Object
Given a list of image filenames, delete the images from the collection.
Instance Method Details
#delete(filenames) ⇒ Object
Given a list of image filenames, delete the images from the collection.
6 7 8 9 10 11 |
# File 'lib/pixmatch/client/delete.rb', line 6 def delete(filenames) filenames = [ filenames ] if filenames.is_a?(String) filenames_hash = { } filenames.each { |f| filenames_hash["filenames[#{filenames_hash.size}]"] = f } request(:post, 'rest', { method: :delete }, { payload: filenames_hash }) end |