module BlockScore::Actions::Delete
Provides a :delete instance method to including classes.
Returns the updated object with deleted == true.
Examples
candidate.delete
> #<BlockScore::Candidate:0x007fe39c424410>¶ ↑
Public Instance Methods
delete()
click to toggle source
# File lib/blockscore/actions/delete.rb, line 18 def delete delete! rescue Error false end
delete!()
click to toggle source
# File lib/blockscore/actions/delete.rb, line 24 def delete! self.class.delete("#{endpoint}/#{id}", {}) attributes[:deleted] = true true end