Class: Thredded::AllViewHooks

Inherits:
Object
  • Object
show all
Defined in:
app/view_hooks/thredded/all_view_hooks.rb

Defined Under Namespace

Classes: MessageboardsIndex, ModerationUserPage, PostCommon, PostForm, PostsCommon, TopicPage, ViewHook

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAllViewHooks

Returns a new instance of AllViewHooks



30
31
32
33
34
35
36
37
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 30

def initialize
  @post_common = PostCommon.new
  @posts_common = PostsCommon.new
  @post_form = PostForm.new
  @moderation_user_page = ModerationUserPage.new
  @messageboards_index = MessageboardsIndex.new
  @topic_page = TopicPage.new
end

Class Attribute Details

.instanceThredded::AllViewHooks (readonly)



21
22
23
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 21

def instance
  @instance
end

Instance Attribute Details

#messageboards_indexMessageboardsIndex (readonly)

Returns:



12
13
14
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 12

def messageboards_index
  @messageboards_index
end

#moderation_user_pageModerationUserPage (readonly)

Returns:



14
15
16
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 14

def moderation_user_page
  @moderation_user_page
end

#post_commonPostCommon (readonly)

Returns:



6
7
8
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 6

def post_common
  @post_common
end

#post_formPostForm (readonly)

Returns:



10
11
12
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 10

def post_form
  @post_form
end

#posts_commonPostsCommon (readonly)

Returns:



8
9
10
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 8

def posts_common
  @posts_common
end

#topic_pageTopicPage (readonly)

Returns:



16
17
18
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 16

def topic_page
  @topic_page
end

Class Method Details

.reset_instance!Object

Called when the class is reloaded so that server restart is not required when changing view hooks in development.



25
26
27
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 25

def reset_instance!
  @instance = Thredded::AllViewHooks.new
end