Class: ActionView::LookupContext::DetailsKey

Inherits:
Object
  • Object
show all
Defined in:
lib/action_view/lookup_context.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDetailsKey

Returns a new instance of DetailsKey.



78
79
80
# File 'lib/action_view/lookup_context.rb', line 78

def initialize
  @hash = object_hash
end

Instance Attribute Details

#hashObject (readonly) Also known as: object_hash

Returns the value of attribute hash.



63
64
65
# File 'lib/action_view/lookup_context.rb', line 63

def hash
  @hash
end

Class Method Details

.clearObject



74
75
76
# File 'lib/action_view/lookup_context.rb', line 74

def self.clear
  @details_keys.clear
end

.get(details) ⇒ Object



66
67
68
69
70
71
72
# File 'lib/action_view/lookup_context.rb', line 66

def self.get(details)
  if details[:formats]
    details = details.dup
    details[:formats] &= Mime::SET.symbols
  end
  @details_keys[details] ||= new
end