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, #aspect_ids, #aspects, #can_comment?, #contacts_link, #for_all_aspects?, #initialize, #people, #stream_posts

Constructor Details

This class inherits a constructor from Stream::Base

Instance Method Details

#contacts_titleString


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

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

4
5
6
# File 'lib/stream/multi.rb', line 4

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


24
25
26
27
28
# File 'lib/stream/multi.rb', line 24

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

#postsObject


18
19
20
# File 'lib/stream/multi.rb', line 18

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

#titleString


9
10
11
# File 'lib/stream/multi.rb', line 9

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