Sha256: dd8dcc21ed246fd0d16c4295de0a448c5dbf519aaf8cffd2b52db69f122158e0

Contents?: true

Size: 444 Bytes

Versions: 5

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true
require_relative 'fb_api'
require_relative 'posting'

module FansWatch
  # Page feeds, with data and paging information
  class Feed
    attr_reader :postings

    def initialize(feed_data:)
      raw_feed = FansWatch::FbApi.page_feed(feed_data)
      @postings = raw_feed.map do |post_data|
        FansWatch::Posting.new(data: post_data)
      end

    end

    def count
      @postings.count
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fanswatch-0.1.4 lib/fanswatch/feed.rb
fanswatch-0.1.3 lib/fanswatch/feed.rb
fanswatch-0.1.2 lib/fanswatch/feed.rb
fanswatch-0.1.1 lib/fanswatch/feed.rb
fanswatch-0.1.0 lib/fanswatch/feed.rb