class ActionView::TemplateRenderer
def resolve_layout(layout, keys, formats)
Experimental RBS support (using type sampling data from the type_fusion
project).
def resolve_layout: ((Proc | ActionView::Template) layout, Array[] keys, Array[Symbol] formats) -> ActionView::Template
This signature was generated using 2 samples from 1 application.
def resolve_layout(layout, keys, formats) details = @details.dup details[:formats] = formats case layout when String begin if layout.start_with?("/") raise ArgumentError, "Rendering layouts from an absolute path is not supported." else @lookup_context.find_template(layout, nil, false, [], details) end rescue ActionView::MissingTemplate all_details = @details.merge(formats: @lookup_context.default_formats) raise unless template_exists?(layout, nil, false, [], **all_details) end when Proc resolve_layout(layout.call(@lookup_context, formats), keys, formats) else layout end end