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

Methods inherited from Util::Cache

#[]

Constructor Details

#initializeJoinedSpaceCache

Returns a new instance of JoinedSpaceCache.



46
47
48
49
50
51
# File 'lib/grape/namespace.rb', line 46

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