class Merb::Router::CachedProc
Cache procs for future reference in eval statement :api: private
Attributes
cache[RW]
:api: private
index[RW]
:api: private
Public Class Methods
[](index)
click to toggle source
Parameters¶ ↑
- index<Fixnum>
-
The index of the cached code to retrieve.
Returns¶ ↑
- CachedProc
-
The cached code at index.
:api: private
# File lib/merb-core/dispatch/router/cached_proc.rb, line 60 def [](index) @@list[index] end
[]=(index, code)
click to toggle source
new(cache)
click to toggle source
register(cached_code)
click to toggle source
Parameters¶ ↑
- cached_code<CachedProc>
-
The cached code to register.
Returns¶ ↑
- 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
Public Instance Methods
to_s()
click to toggle source
Returns¶ ↑
- String
-
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