Module: Feedbook::Comparers::PostsComparer
- Defined in:
- lib/feedbook/comparers/posts_comparer.rb
Class Method Summary collapse
-
.get_new_posts(old_posts, new_posts) ⇒ type
Returns only posts from new posts list that does not exists in old posts list.
Class Method Details
.get_new_posts(old_posts, new_posts) ⇒ type
Returns only posts from new posts list that does not exists in old posts list.
10 11 12 |
# File 'lib/feedbook/comparers/posts_comparer.rb', line 10 def self.get_new_posts(old_posts, new_posts) new_posts.select { |post| old_posts.all? { |opost| opost.url != post.url } } end |