Sha256: ca6bbcb6d0a171642f65d6c2fa96f0292ebd5f8975f244f4b5e0e73c87b5aa6f
Contents?: true
Size: 341 Bytes
Versions: 5
Compression:
Stored size: 341 Bytes
Contents
module Twog module BlogPostsHandler def get_new_blog_posts(posts, last_blog_post_tweeted) return [] unless posts && posts.length > 0 return posts unless last_blog_post_tweeted new_posts = posts.reject do |post| Time.parse(post.date.to_s) <= Time.parse(last_blog_post_tweeted.to_s) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems