Parent

Class Index [+]

Quicksearch

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

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
60:         def [](index) @@list[index] end
[]=(index, code) click to toggle source

Sets the cached code for a specific index.

Parameters

index

The index of the cached code to set.

code

The cached code to set.

:api: private

    # File lib/merb-core/dispatch/router/cached_proc.rb, line 51
51:         def []=(index, code) @@list[index] = code end
new(cache) click to toggle source

Parameters

cache

The block of code to cache.

:api: private

    # File lib/merb-core/dispatch/router/cached_proc.rb, line 17
17:       def initialize(cache)
18:         @cache, @index = cache, CachedProc.register(self)
19:       end
register(cached_code) click to toggle source

Parameters

cached_code

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
38:         def register(cached_code)
39:           CachedProc[@@index] = cached_code
40:           @@index += 1
41:           @@index - 1
42:         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
25:       def to_s
26:         "CachedProc[#{@index}].cache"
27:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.