Sha256: 6a6a155637b17f0efc432aaff3f89a81cd0444abc8fb66882f0f549988917a44
Contents?: true
Size: 564 Bytes
Versions: 9
Compression:
Stored size: 564 Bytes
Contents
module Redd module Objects class Thing # Things that can be edited and deleted. module Editable # Edit a thing. # @param text [String] The new text. # @return [Thing] The edited thing. def edit(text) post("/api/editusertext", thing_id: fullname, text: text) self[(self.is_a?(Submission) ? :selftext : :body)] = text self end # Delete the thing def delete! post("/api/del", id: fullname) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems