lib/roda/plugins/render.rb in roda-3.33.0 vs lib/roda/plugins/render.rb in roda-3.34.0

- old
+ new

@@ -285,11 +285,13 @@ end false end + # :nocov: if COMPILED_METHOD_SUPPORT + # :nocov: # Compile a method in the given module with the given name that will # call the compiled template method, updating the compiled template method def define_compiled_method(roda_class, method_name, locals_keys=EMPTY_ARRAY) mod = roda_class::RodaCompiledTemplates internal_method_name = :"_#{method_name}" @@ -335,10 +337,12 @@ # them as necessary to prevent changes in the subclass # affecting the parent class. def inherited(subclass) super opts = subclass.opts[:render] = subclass.opts[:render].dup + # :nocov: if COMPILED_METHOD_SUPPORT + # :nocov: opts[:template_method_cache] = (opts[:cache_class] || RodaCache).new end opts[:cache] = opts[:cache].dup opts.freeze end