Class: ActivityStream::Stream
- Inherits:
-
Object
- Object
- ActivityStream::Stream
- Defined in:
- lib/activity_stream/stream.rb
Instance Method Summary collapse
-
#activities(reload = false) ⇒ Object
The activities for the collection of actors.
-
#initialize(name, actor, opts = {}) ⇒ Stream
constructor
A new instance of Stream.
Constructor Details
#initialize(name, actor, opts = {}) ⇒ Stream
Returns a new instance of Stream.
9 10 11 12 13 |
# File 'lib/activity_stream/stream.rb', line 9 def initialize(name, actor, opts = {}) @name = name @actor = actor @collection = initialize_collection(opts[:actors]) end |
Instance Method Details
#activities(reload = false) ⇒ Object
Returns the activities for the collection of actors.
17 18 19 20 21 22 23 |
# File 'lib/activity_stream/stream.rb', line 17 def activities(reload = false) if @activities && !reload @activities else @activities = ::Activity.by_actors(@collection) end end |