Module: Roda::RodaPlugins::Render::ClassMethods

Defined in:
lib/roda/plugins/render.rb

Instance Method Summary collapse

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.



206
207
208
209
210
211
# File 'lib/roda/plugins/render.rb', line 206

def inherited(subclass)
  super
  opts = subclass.opts[:render] = subclass.opts[:render].dup
  opts[:cache] = opts[:cache].dup
  opts.freeze
end

#render_optsObject

Return the render options for this class.



214
215
216
# File 'lib/roda/plugins/render.rb', line 214

def render_opts
  opts[:render]
end