Class: ActionView::LookupContext::DetailsKey
- Defined in:
- actionview/lib/action_view/lookup_context.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#hash ⇒ Object
(also: #object_hash)
readonly
Returns the value of attribute hash.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ DetailsKey
constructor
A new instance of DetailsKey.
Constructor Details
#initialize ⇒ DetailsKey
Returns a new instance of DetailsKey.
81 82 83 |
# File 'actionview/lib/action_view/lookup_context.rb', line 81 def initialize @hash = object_hash end |
Instance Attribute Details
#hash ⇒ Object (readonly) Also known as: object_hash
Returns the value of attribute hash
63 64 65 |
# File 'actionview/lib/action_view/lookup_context.rb', line 63 def hash @hash end |
Class Method Details
.clear ⇒ Object
77 78 79 |
# File 'actionview/lib/action_view/lookup_context.rb', line 77 def self.clear @details_keys.clear end |
.get(details) ⇒ Object
66 67 68 69 70 71 72 73 74 75 |
# File 'actionview/lib/action_view/lookup_context.rb', line 66 def self.get(details) if details[:formats] details = details.dup syms = Set.new Mime::SET.symbols details[:formats] = details[:formats].select { |v| syms.include? v } end @details_keys[details] ||= new end |