Sha256: b254c62af61c3ac2fddaeee47f65e7868d6778d502575043697cb2f7e25930df
Contents?: true
Size: 1.09 KB
Versions: 12
Compression:
Stored size: 1.09 KB
Contents
module Coprl module Presenters module Plugins module <%= classify(name) %> module WebClientComponents def view_dir_<%= underscore(name) %>(pom) File.join(__dir__, '../../../../../../..', 'views', 'components') end def render_<%= underscore(name) %>(comp,render:, components:, index:) render.call :erb, :<%= underscore(name) %>, views: view_dir_<%= underscore(name) %>(comp), locals: {comp: comp, components: components, index: index} end # The string returned from this method will be added to the HTML header section of the page layout # It will be called once for the page. # The pom is passed along with the sinatra render method. def render_header_<%= underscore(name) %>(pom, render:) view_dir = File.join(__dir__, '../../../../../../..', 'views', 'components') render.call :erb, :<%= underscore(name) %>_header, views: view_dir_<%= underscore(name) %>(pom) end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems