Class: Grape::Router::Pattern::PatternCache
- Inherits:
-
Util::Cache
- Object
- Util::Cache
- Grape::Router::Pattern::PatternCache
- Defined in:
- lib/grape/router/pattern.rb
Instance Attribute Summary
Attributes inherited from Util::Cache
Instance Method Summary collapse
-
#initialize ⇒ PatternCache
constructor
A new instance of PatternCache.
Methods inherited from Util::Cache
Constructor Details
#initialize ⇒ PatternCache
Returns a new instance of PatternCache.
100 101 102 103 104 105 |
# File 'lib/grape/router/pattern.rb', line 100 def initialize super @cache = Hash.new do |h, (pattern, suffix)| h[[pattern, suffix]] = -"#{pattern}#{suffix}" end end |