module DataSteroid::Persistable::Deletable

Defines behaviour for delete operations.

Public Instance Methods

delete() click to toggle source
# File lib/data_steroid/persistable/deletable.rb, line 8
def delete
  @gcloud_entity ||= self.class.datastore_entity
  if !@gcloud_entity.persisted? && id.present?
    @gcloud_entity.key = gcloud_key
  end
  self.class.datastore.delete @gcloud_entity
end