Module: Roda::RodaPlugins::Render::ClassMethods
- Defined in:
- lib/roda/plugins/render.rb
Instance Method Summary collapse
-
#inherited(subclass) ⇒ Object
Copy the rendering options into the subclass, duping them as necessary to prevent changes in the subclass affecting the parent class.
-
#render_opts ⇒ Object
Return the render options for this class.
Instance Method Details
#inherited(subclass) ⇒ Object
Copy the rendering options into the subclass, duping them as necessary to prevent changes in the subclass affecting the parent class.
325 326 327 328 329 330 331 332 333 |
# File 'lib/roda/plugins/render.rb', line 325 def inherited(subclass) super opts = subclass.opts[:render] = subclass.opts[:render].dup if COMPILED_METHOD_SUPPORT opts[:template_method_cache] = (opts[:cache_class] || RodaCache).new end opts[:cache] = opts[:cache].dup opts.freeze end |
#render_opts ⇒ Object
Return the render options for this class.
336 337 338 |
# File 'lib/roda/plugins/render.rb', line 336 def render_opts opts[:render] end |