Cache procs for future reference in eval statement :api: private
index<Fixnum> |
The index of the cached code to retrieve. |
The cached code at index. |
:api: private
# File lib/merb-core/dispatch/router/cached_proc.rb, line 60 def [](index) @@list[index] end
Sets the cached code for a specific index.
index<Fixnum> |
The index of the cached code to set. |
code<CachedProc> |
The cached code to set. |
:api: private
# File lib/merb-core/dispatch/router/cached_proc.rb, line 51 def []=(index, code) @@list[index] = code end
cache<Proc> |
The block of code to cache. |
:api: private
# File lib/merb-core/dispatch/router/cached_proc.rb, line 17 def initialize(cache) @cache, @index = cache, CachedProc.register(self) end
cached_code<CachedProc> |
The cached code to register. |
Fixnum |
The index of the newly registered CachedProc. |
:api: private
# File lib/merb-core/dispatch/router/cached_proc.rb, line 38 def register(cached_code) CachedProc[@@index] = cached_code @@index += 1 @@index - 1 end
The CachedProc object in a format embeddable within a string. |
:api: private
# File lib/merb-core/dispatch/router/cached_proc.rb, line 25 def to_s "CachedProc[#{@index}].cache" end
Generated with the Darkfish Rdoc Generator 2.