Class: Grape::Router::Pattern::PatternCache

Inherits:
Util::Cache
  • Object
show all
Defined in:
lib/grape/router/pattern.rb

Instance Attribute Summary

Attributes inherited from Util::Cache

#cache

Instance Method Summary collapse

Constructor Details

#initializePatternCache

Returns a new instance of PatternCache.



59
60
61
62
63
# File 'lib/grape/router/pattern.rb', line 59

def initialize
  @cache = Hash.new do |h, (pattern, suffix)|
    h[[pattern, suffix]] = -"#{pattern}#{suffix}"
  end
end