Class: ActionView::TemplateDetails
Do not use. This class is for internal use only.
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Inherits: | Object |
Defined in: | actionview/lib/action_view/template_details.rb |
Class Method Summary
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(locale, handler, format, variant) ⇒ TemplateDetails
Instance Attribute Details
#format (readonly)
[ GitHub ]#handler (readonly)
[ GitHub ]#locale (readonly)
[ GitHub ]#variant (readonly)
[ GitHub ]Instance Method Details
#format_or_default
[ GitHub ]# File 'actionview/lib/action_view/template_details.rb', line 62
def format_or_default format || handler_class.try(:default_format) end
#handler_class
[ GitHub ]# File 'actionview/lib/action_view/template_details.rb', line 58
def handler_class Template.handler_for_extension(handler) end
#matches?(requested) ⇒ Boolean
# File 'actionview/lib/action_view/template_details.rb', line 42
def matches?(requested) requested.formats_idx[@format] && requested.locale_idx[@locale] && requested.variants_idx[@variant] && requested.handlers_idx[@handler] end
#sort_key_for(requested)
[ GitHub ]# File 'actionview/lib/action_view/template_details.rb', line 49
def sort_key_for(requested) [ requested.formats_idx[@format], requested.locale_idx[@locale], requested.variants_idx[@variant], requested.handlers_idx[@handler] ] end