Class: MC2P::DeleteObjectItemMixin

Inherits:
ObjectItemMixin show all
Defined in:
lib/mixins.rb

Overview

Allows delete an object item

Instance Attribute Summary

Attributes inherited from ObjectItemMixin

#_deleted, #json_dict, #resource

Instance Method Summary collapse

Methods inherited from ObjectItemMixin

#id_required_and_not_deleted, #initialize, #to_s

Constructor Details

This class inherits a constructor from MC2P::ObjectItemMixin

Instance Method Details

#deleteObject

Deletes the object item



31
32
33
34
35
36
37
# File 'lib/mixins.rb', line 31

def delete
  id_required_and_not_deleted
  @resource.delete(
    @json_dict[@id_property]
  )
  @_deleted = true
end