Class: Thredded::AllViewHooks::ViewHook
- Inherits:
-
Object
- Object
- Thredded::AllViewHooks::ViewHook
- Defined in:
- app/view_hooks/thredded/all_view_hooks.rb
Overview
Contains the view hook content and can render a view hook.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ViewHook
constructor
A new instance of ViewHook.
- #render(view_context, **args, &block) ⇒ String
Constructor Details
#initialize ⇒ ViewHook
Returns a new instance of ViewHook.
151 152 153 |
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 151 def initialize @config = Thredded::ViewHooks::Config.new end |
Instance Attribute Details
#config ⇒ Thredded::ViewHooks::Config (readonly)
149 150 151 |
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 149 def config @config end |
Instance Method Details
#render(view_context, **args, &block) ⇒ String
156 157 158 |
# File 'app/view_hooks/thredded/all_view_hooks.rb', line 156 def render(view_context, **args, &block) Thredded::ViewHooks::Renderer.new(view_context, @config).render(**args, &block) end |