Sha256: 41a8cc70a387b3a65a0278cb711026814bd40ceedfd9cc627a1976840c31813b

Contents?: true

Size: 364 Bytes

Versions: 2

Compression:

Stored size: 364 Bytes

Contents

require 'rubygems'
require 'twitter_oauth'
require 'yaml'

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 { |post| Time.parse(post.updated.content.to_s) <= Time.parse(last_blog_post_tweeted.to_s) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twog-0.1.0 lib/twog/blog_posts_handler.rb
twog-0.0.1 lib/twog/blog_posts_handler.rb