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

Methods inherited from Util::Cache

#[]

Constructor Details

#initializeCaptureIndexCache

Returns a new instance of CaptureIndexCache.



76
77
78
79
80
81
# File 'lib/grape/router/base_route.rb', line 76

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