Module: Redd::Objects::Thing::Moderatable
- Included in:
- Comment, Submission
- Defined in:
- lib/redd/objects/thing/moderatable.rb
Overview
Things that a moderator can manage.
Instance Method Summary collapse
-
#approve! ⇒ Object
Approve a submission.
-
#distinguish(how = :yes) ⇒ Object
Distinguish a link or comment with a sigil to show that it has been created by a moderator.
-
#ignore_reports ⇒ Object
Stop getting any moderator-related reports on the thing.
-
#remove!(spam = false) ⇒ Object
Remove a submission.
-
#undistinguish ⇒ Object
Remove the sigil that shows a thing was created by a moderator.
-
#unignore_reports ⇒ Object
Start getting moderator-related reports on the thing again.
Instance Method Details
#approve! ⇒ Object
Approve a submission.
7 8 9 |
# File 'lib/redd/objects/thing/moderatable.rb', line 7 def approve! post('/api/approve', id: fullname) end |
#distinguish(how = :yes) ⇒ Object
Distinguish a link or comment with a sigil to show that it has been created by a moderator.
22 23 24 |
# File 'lib/redd/objects/thing/moderatable.rb', line 22 def distinguish(how = :yes) post('/api/distinguish', id: fullname, how: how) end |
#ignore_reports ⇒ Object
Stop getting any moderator-related reports on the thing.
32 33 34 |
# File 'lib/redd/objects/thing/moderatable.rb', line 32 def ignore_reports post('/api/ignore_reports', id: fullname) end |
#remove!(spam = false) ⇒ Object
Remove a submission.
14 15 16 |
# File 'lib/redd/objects/thing/moderatable.rb', line 14 def remove!(spam = false) post('/api/remove', id: fullname, spam: spam) end |
#undistinguish ⇒ Object
Remove the sigil that shows a thing was created by a moderator.
27 28 29 |
# File 'lib/redd/objects/thing/moderatable.rb', line 27 def undistinguish distinguish(:no) end |
#unignore_reports ⇒ Object
Start getting moderator-related reports on the thing again.
37 38 39 |
# File 'lib/redd/objects/thing/moderatable.rb', line 37 def unignore_reports post('/api/unignore_reports', id: fullname) end |