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.
182 183 184 185 186 187 |
# File 'lib/roda/plugins/render.rb', line 182 def inherited(subclass) super opts = subclass.opts[:render] = subclass.opts[:render].dup opts[:cache] = thread_safe_cache if opts[:cache] opts.freeze end |
#render_opts ⇒ Object
Return the render options for this class.
190 191 192 |
# File 'lib/roda/plugins/render.rb', line 190 def render_opts opts[:render] end |