instance method
cache_as
Ruby on Rails 1.0.3
Since v1.0.3 Last seen in v2.2.3 PrivateSignature
cache_as(name)
No documentation comment.
Parameters
-
namereq
Source
# File lib/importmap/map.rb, line 89
def cache_as(name)
if result = instance_variable_get("@cached_#{name}")
result
else
remember_cache_key(name)
instance_variable_set("@cached_#{name}", yield)
end
end
Defined in lib/importmap/map.rb line 89
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Importmap::Map