module Roda::RodaPlugins::NamedTemplates::ClassMethods

  1. lib/roda/plugins/named_templates.rb

Methods

Public Instance

  1. freeze
  2. template

Public Instance methods

freeze()

Freeze the named templates so that there can be no thread safety issues at runtime.

[show source]
   # File lib/roda/plugins/named_templates.rb
67 def freeze
68   named_templates.freeze
69   super
70 end
template(name, options=nil, &block)

Store a new template block and options for the given template name.

[show source]
   # File lib/roda/plugins/named_templates.rb
73 def template(name, options=nil, &block)
74   named_templates[name.to_s] = [options, define_roda_method("named_templates_#{name}", 0, &block)].freeze
75   nil
76 end