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.



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

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