Class: SocialConnections::Feed

Inherits:
Object
  • Object
show all
Defined in:
lib/social_connections/social_aggregator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#activitiesObject

Returns the value of attribute activities.



23
24
25
# File 'lib/social_connections/social_aggregator.rb', line 23

def activities
  @activities
end

#by_verbObject

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_selfObject

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

#whoObject

Returns the value of attribute who.



23
24
25
# File 'lib/social_connections/social_aggregator.rb', line 23

def who
  @who
end