Class: Rubyhexagon::Search::TagHistory

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyhexagon/search/tag_history.rb

Overview

Class to hold methods for fetching tag changes.

Author:

  • Maxine Michalski

Since:

  • 1.4.0

Class Method Summary collapse

Class Method Details

.list(page = 1) ⇒ Array<Post>

Retrieve a list of posts with changed tags This method accepts blocks and only returns one page without blocks

Parameters:

  • page (Integer) (defaults to: 1)

    page of deleted posts to return

Returns:

  • (Array<Post>)

    an array of deleted posts

Author:

  • Maxine Michalski

Since:

  • 1.4.0



38
39
40
41
42
43
44
45
46
# File 'lib/rubyhexagon/search/tag_history.rb', line 38

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