Class: Grape::Namespace::JoinedSpaceCache

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

Instance Attribute Summary

Attributes inherited from Util::Cache

#cache

Instance Method Summary collapse

Constructor Details

#initializeJoinedSpaceCache

Returns a new instance of JoinedSpaceCache.



38
39
40
41
42
43
# File 'lib/grape/namespace.rb', line 38

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