class Scribble::Methods::Layout
Public Instance Methods
content()
click to toggle source
# File lib/scribble/methods/layout.rb, line 16 def content render context: @context end
layout(name, object = nil)
click to toggle source
# File lib/scribble/methods/layout.rb, line 6 def layout name, object = nil template.load(name, self).tap do |partial_context| raise Errors::NotFound.new("Layout partial '#{name}' not found #{@call.line_and_column}") if partial_context.nil? partial_context.set_variable name.to_sym, object if object @render_format = partial_context.format end.render end
render_format()
click to toggle source
Calls superclass method
Scribble::Support::Context#render_format
# File lib/scribble/methods/layout.rb, line 20 def render_format @render_format || super end