module Redd::Objects::Thing::Editable
Things that can be edited and deleted.
Public Instance Methods
delete!()
click to toggle source
Delete the thing
# File lib/redd/objects/thing/editable.rb, line 16 def delete! post('/api/del', id: fullname) end
edit(text)
click to toggle source
Edit a thing. @param text [String] The new text. @return [Thing] The edited thing.
# File lib/redd/objects/thing/editable.rb, line 9 def edit(text) post('/api/editusertext', thing_id: fullname, text: text) self[(is_a?(Submission) ? :selftext : :body)] = text self end