Class methods for RodaRequest
Attributes
| match_pattern_cache | [RW] |
The cache to use for match patterns for this request class. |
| roda_class | [RW] |
Reference to the |
Public Instance methods
cached_matcher(obj)
Return the cached pattern for the given object. If the object is not already cached, yield to get the basic pattern, and convert the basic pattern to a pattern that does not match partial segments.
[show source]
# File lib/roda/request.rb 40 def cached_matcher(obj) 41 cache = @match_pattern_cache 42 43 unless pattern = cache[obj] 44 pattern = cache[obj] = consume_pattern(yield) 45 end 46 47 pattern 48 end
inspect()
Since RodaRequest is anonymously subclassed when Roda is subclassed, and then assigned to a constant of the Roda subclass, make inspect reflect the likely name for the class.
[show source]
# File lib/roda/request.rb 53 def inspect 54 "#{roda_class.inspect}::RodaRequest" 55 end