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.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
# File 'lib/roda/plugins/render.rb', line 200 def inherited(subclass) super opts = subclass.opts[:render] = subclass.opts[:render].dup if opts[:cache] if cache_class = opts[:cache_class] opts[:cache] = cache_class.new else opts[:cache] = thread_safe_cache end end opts.freeze end |
#render_opts ⇒ Object
Return the render options for this class.
216 217 218 |
# File 'lib/roda/plugins/render.rb', line 216 def render_opts opts[:render] end |