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.
107 108 109 110 111 112 113 |
# File 'lib/roda/plugins/render.rb', line 107 def inherited(subclass) super opts = subclass.opts[:render] = render_opts.dup opts[:layout_opts] = opts[:layout_opts].dup opts[:opts] = opts[:opts].dup opts[:cache] = thread_safe_cache if opts[:cache] end |
#render_opts ⇒ Object
Return the render options for this class.
116 117 118 |
# File 'lib/roda/plugins/render.rb', line 116 def render_opts opts[:render] end |