class ActionView::TemplateDetails
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/action_view/template_details.rbs class ActionView::TemplateDetails def initialize: (nil locale, Symbol handler, Symbol format, nil variant) -> void end
:nodoc:
def format_or_default
def format_or_default format || handler_class.try(:default_format) end
def handler_class
def handler_class Template.handler_for_extension(handler) end
def initialize(locale, handler, format, variant)
Experimental RBS support (using type sampling data from the type_fusion
project).
def initialize: (nil locale, Symbol handler, Symbol format, nil variant) -> void
This signature was generated using 1 sample from 1 application.
def initialize(locale, handler, format, variant) @locale = locale @handler = handler @format = format @variant = variant end
def matches?(requested)
def matches?(requested) requested.formats_idx[@format] && requested.locale_idx[@locale] && requested.variants_idx[@variant] && requested.handlers_idx[@handler] end
def sort_key_for(requested)
def sort_key_for(requested) [ requested.formats_idx[@format], requested.locale_idx[@locale], requested.variants_idx[@variant], requested.handlers_idx[@handler] ] end