module Roda::RodaPlugins::RenderLocals

def self.configure(app, opts=OPTS)

def self.configure(app, opts=OPTS)
  app.opts[:render_locals] = (app.opts[:render_locals] || {}).merge(opts[:render]||{}).freeze
  app.opts[:layout_locals] = (app.opts[:layout_locals] || {}).merge(opts[:layout]||{}).freeze
  if opts.has_key?(:merge)
    app.opts[:merge_locals] = opts[:merge]
    app.opts[:layout_locals] = app.opts[:render_locals].merge(app.opts[:layout_locals]).freeze
  end
end