Class: SocialConnections::Feed
- Inherits:
-
Object
- Object
- SocialConnections::Feed
- Defined in:
- lib/social_connections/social_aggregator.rb
Instance Attribute Summary collapse
-
#activities ⇒ Object
Returns the value of attribute activities.
-
#by_verb ⇒ Object
Returns the value of attribute by_verb.
-
#excluding_self ⇒ Object
Returns the value of attribute excluding_self.
-
#who ⇒ Object
Returns the value of attribute who.
Instance Method Summary collapse
-
#initialize(who) ⇒ Feed
constructor
A new instance of Feed.
Constructor Details
#initialize(who) ⇒ Feed
Returns a new instance of Feed.
24 25 26 27 28 29 30 |
# File 'lib/social_connections/social_aggregator.rb', line 24 def initialize(who) self.who = who self.activities = SocialActivity.unseen_activities(who) aggreg = AggregatedActivities.new(activities) self.by_verb = aggreg.by_verb self.excluding_self = AggregatedActivities.new( activities.select {|a| a.subject != who} ) end |
Instance Attribute Details
#activities ⇒ Object
Returns the value of attribute activities.
23 24 25 |
# File 'lib/social_connections/social_aggregator.rb', line 23 def activities @activities end |
#by_verb ⇒ Object
Returns the value of attribute by_verb.
23 24 25 |
# File 'lib/social_connections/social_aggregator.rb', line 23 def by_verb @by_verb end |
#excluding_self ⇒ Object
Returns the value of attribute excluding_self.
23 24 25 |
# File 'lib/social_connections/social_aggregator.rb', line 23 def excluding_self @excluding_self end |
#who ⇒ Object
Returns the value of attribute who.
23 24 25 |
# File 'lib/social_connections/social_aggregator.rb', line 23 def who @who end |