Class: FaceGroup::Feed
- Inherits:
-
Object
- Object
- FaceGroup::Feed
- Defined in:
- lib/facegroup/feed.rb
Overview
Group feeds, with data and paging information
Instance Attribute Summary collapse
-
#postings ⇒ Object
readonly
Returns the value of attribute postings.
Instance Method Summary collapse
- #count ⇒ Object
-
#initialize(feed_data:) ⇒ Feed
constructor
A new instance of Feed.
Constructor Details
#initialize(feed_data:) ⇒ Feed
Returns a new instance of Feed.
10 11 12 13 14 15 16 17 |
# File 'lib/facegroup/feed.rb', line 10 def initialize(feed_data:) postings_data = feed_data['data'] @postings = postings_data.map do |post_data| FaceGroup::Posting.new(data: post_data) end @pagination = feed_data['pagination'] end |
Instance Attribute Details
#postings ⇒ Object (readonly)
Returns the value of attribute postings.
8 9 10 |
# File 'lib/facegroup/feed.rb', line 8 def postings @postings end |
Instance Method Details
#count ⇒ Object
19 20 21 |
# File 'lib/facegroup/feed.rb', line 19 def count @postings.count end |