Class: Rubyhexagon::Search::FlagHistory
- Inherits:
-
Object
- Object
- Rubyhexagon::Search::FlagHistory
- Defined in:
- lib/rubyhexagon/search/flag_history.rb
Overview
Class to hold methods for fetching a list of flagged posts.
Class Method Summary collapse
-
.list(page = 1) ⇒ Array<DeletedPost>
Retrieve a list of flagged posts, with flag reason.
Class Method Details
.list(page = 1) ⇒ Array<DeletedPost>
Retrieve a list of flagged posts, with flag reason. Only id and del_reason is present. This method accepts blocks and only returns one page without blocks
39 40 41 42 43 44 45 46 47 |
# File 'lib/rubyhexagon/search/flag_history.rb', line 39 def self.list(page = 1) d = fetch_list(page) while block_given? && d != [] d.each { |del| yield del } page += 1 d = fetch_list(page) end d end |