Class: Grape::Path::PartsCache

Inherits:
Util::Cache show all
Defined in:
lib/grape/path.rb

Instance Attribute Summary

Attributes inherited from Util::Cache

#cache

Instance Method Summary collapse

Constructor Details

#initializePartsCache

Returns a new instance of PartsCache.



68
69
70
71
72
73
# File 'lib/grape/path.rb', line 68

def initialize
  super
  @cache = Hash.new do |h, parts|
    h[parts] = Grape::Router.normalize_path(parts.join('/'))
  end
end