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, 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.



28
29
30
31
32
33
34
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 28

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

Class Attribute Details

.instanceThredded::AllViewHooks (readonly)



19
20
21
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 19

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

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.



23
24
25
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 23

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