Module: RedboothRuby::Operations::Delete::ClassMethods

Defined in:
lib/redbooth-ruby/operations/delete.rb

Instance Method Summary collapse

Instance Method Details

#delete(attributes = {}) ⇒ Boolean

Deletes the given object

Parameters:

  • attributes (Hash) (defaults to: {})

    hash of given attributes passed to the delete method

Returns:

  • (Boolean)


9
10
11
12
13
14
15
16
17
18
# File 'lib/redbooth-ruby/operations/delete.rb', line 9

def delete(attributes = {})
  id = attributes.delete(:id)
  response = RedboothRuby.request(:delete,
                                  nil,
                                  api_member_url(id, :delete),
                                  {},
                                  options_for_request(attributes)
                                 )
  true
end