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.



77
78
79
80
81
# File 'lib/grape/path.rb', line 77

def initialize
  @cache = Hash.new do |h, parts|
    h[parts] = -parts.join('/')
  end
end