Class: ActionView::TemplateDetails::Requested
- Defined in:
- actionview/lib/action_view/template_details.rb
Constant Summary collapse
- ANY_HASH =
Hash.new(1).merge(nil => 0).freeze
Instance Attribute Summary collapse
-
#formats ⇒ Object
readonly
Returns the value of attribute formats.
-
#formats_idx ⇒ Object
readonly
Returns the value of attribute formats_idx.
-
#handlers ⇒ Object
readonly
Returns the value of attribute handlers.
-
#handlers_idx ⇒ Object
readonly
Returns the value of attribute handlers_idx.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#locale_idx ⇒ Object
readonly
Returns the value of attribute locale_idx.
-
#variants ⇒ Object
readonly
Returns the value of attribute variants.
-
#variants_idx ⇒ Object
readonly
Returns the value of attribute variants_idx.
Instance Method Summary collapse
-
#initialize(locale:, handlers:, formats:, variants:) ⇒ Requested
constructor
A new instance of Requested.
Constructor Details
#initialize(locale:, handlers:, formats:, variants:) ⇒ Requested
Returns a new instance of Requested.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'actionview/lib/action_view/template_details.rb', line 11 def initialize(locale:, handlers:, formats:, variants:) @locale = locale @handlers = handlers @formats = formats @variants = variants @locale_idx = build_idx_hash(locale) @handlers_idx = build_idx_hash(handlers) @formats_idx = build_idx_hash(formats) if variants == :any @variants_idx = ANY_HASH else @variants_idx = build_idx_hash(variants) end end |
Instance Attribute Details
#formats ⇒ Object (readonly)
Returns the value of attribute formats
6 7 8 |
# File 'actionview/lib/action_view/template_details.rb', line 6 def formats @formats end |
#formats_idx ⇒ Object (readonly)
Returns the value of attribute formats_idx
7 8 9 |
# File 'actionview/lib/action_view/template_details.rb', line 7 def formats_idx @formats_idx end |
#handlers ⇒ Object (readonly)
Returns the value of attribute handlers
6 7 8 |
# File 'actionview/lib/action_view/template_details.rb', line 6 def handlers @handlers end |
#handlers_idx ⇒ Object (readonly)
Returns the value of attribute handlers_idx
7 8 9 |
# File 'actionview/lib/action_view/template_details.rb', line 7 def handlers_idx @handlers_idx end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale
6 7 8 |
# File 'actionview/lib/action_view/template_details.rb', line 6 def locale @locale end |
#locale_idx ⇒ Object (readonly)
Returns the value of attribute locale_idx
7 8 9 |
# File 'actionview/lib/action_view/template_details.rb', line 7 def locale_idx @locale_idx end |
#variants ⇒ Object (readonly)
Returns the value of attribute variants
6 7 8 |
# File 'actionview/lib/action_view/template_details.rb', line 6 def variants @variants end |
#variants_idx ⇒ Object (readonly)
Returns the value of attribute variants_idx
7 8 9 |
# File 'actionview/lib/action_view/template_details.rb', line 7 def variants_idx @variants_idx end |