Class: Stream::Multi

Inherits:
Base
  • Object
show all
Defined in:
lib/stream/multi.rb

Constant Summary

Constants inherited from Base

Base::TYPES_OF_POST_IN_STREAM

Instance Attribute Summary

Attributes inherited from Base

#max_time, #order, #publisher, #user

Instance Method Summary collapse

Methods inherited from Base

#aspect, #aspects, #can_comment?, #for_all_aspects?, #initialize, #people, #stream_posts

Constructor Details

This class inherits a constructor from Stream::Base

Instance Method Details

Returns URL.

Returns:


6
7
8
# File 'lib/stream/multi.rb', line 6

def link(opts)
  Rails.application.routes.url_helpers.stream_path(opts)
end

#post_from_group(post) ⇒ Object

emits an enum of the groups which the post appeared :spotlight, :aspects, :tags, :mentioned


21
22
23
24
25
# File 'lib/stream/multi.rb', line 21

def post_from_group(post)
  streams_included.collect do |source|
    is_in?(source, post)
  end.compact
end

#postsObject


15
16
17
# File 'lib/stream/multi.rb', line 15

def posts
  @posts ||= ::EvilQuery::MultiStream.new(user, order, max_time, include_community_spotlight?).make_relation!
end

#titleString

Returns:


11
12
13
# File 'lib/stream/multi.rb', line 11

def title
  I18n.t('streams.multi.title')
end