class Voom::Presenters::WebClient::PluginHeaders
This class renders headers for the plugins into the default layout.
Public Class Methods
new(pom:, render:)
click to toggle source
# File lib/voom/presenters/web_client/plugin_headers.rb, line 11 def initialize(pom:, render:) @pom = pom @render = render initialize_plugins end
Public Instance Methods
render()
click to toggle source
# File lib/voom/presenters/web_client/plugin_headers.rb, line 17 def render results = "" ((@plugins||[]) + Voom::Presenters::Settings.config.presenters.plugins).each do |plugin| header_method = :"render_header_#{plugin}" results << send(header_method, @pom, render: @render) if respond_to?(header_method) end results end
Private Instance Methods
initialize_plugins()
click to toggle source
# File lib/voom/presenters/web_client/plugin_headers.rb, line 30 def initialize_plugins @plugins = @pom.send(:plugins) self.class.include_plugins(:WebClientComponents, plugins: @plugins) end