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 format_or_default: () -> Symbol
  def handler_class: () -> ActionView::Template::Handlers::ERB
  def initialize: (nil locale, Symbol handler, Symbol format, nil variant) -> void
  def matches?: (ActionView::TemplateDetails::Requested requested) -> Integer
end

:nodoc:

def format_or_default

Experimental RBS support (using type sampling data from the type_fusion project).

def format_or_default: () -> Symbol

This signature was generated using 1 sample from 1 application.

def format_or_default
  format || handler_class.try(:default_format)
end

def handler_class

Experimental RBS support (using type sampling data from the type_fusion project).

def handler_class: () -> ActionView::Template::Handlers::ERB

This signature was generated using 1 sample from 1 application.

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)

Experimental RBS support (using type sampling data from the type_fusion project).

def matches?: (ActionView::TemplateDetails::Requested requested) -> Integer

This signature was generated using 10 samples from 1 application.

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