module Wire::Renderer
Renderer
is a module for mapping mime to rendering templates @author Bryan T. Meyers
Public Class Methods
configure_partial(conf)
click to toggle source
Callback for handling partials @param [Hash] conf the raw configuration @return [Hash] post-processed configuration
# File lib/closet/renderer.rb, line 28 def self.configure_partial(conf) conf['partial'] = Tilt.new(conf['partial'], 1) conf end
configure_template(conf)
click to toggle source
Callback for handling templates @param [Hash] conf the raw configuration @return [Hash] post-processed configuration
# File lib/closet/renderer.rb, line 36 def self.configure_template(conf) conf['file'] = Tilt.new(conf['file'], 1) conf end
read_configs()
click to toggle source
Read all of the configs in './config/editors', './config/renderers', '.config/templates' @return [void]
# File lib/closet/renderer.rb, line 43 def self.read_configs editors = Wire::Config.read_config_dir('config/editors', method(:configure_template)) renderers = Wire::Config.read_config_dir('config/renderers', method(:configure_partial)) templates = Wire::Config.read_config_dir('config/templates', method(:configure_template)) [editors, renderers, templates] end