Class: Grape::Router::BaseRoute::CaptureIndexCache

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

Instance Attribute Summary

Attributes inherited from Util::Cache

#cache

Instance Method Summary collapse

Constructor Details

#initializeCaptureIndexCache

Returns a new instance of CaptureIndexCache.



30
31
32
33
34
35
# File 'lib/grape/router/base_route.rb', line 30

def initialize
  super
  @cache = Hash.new do |h, index|
    h[index] = "_#{index}"
  end
end