Class: RocketAMF::Pure::StringCache

Inherits:
Hash
  • Object
show all
Defined in:
lib/rocketamf/pure/helpers/string_cache.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeStringCache

Returns a new instance of StringCache.



4
5
6
# File 'lib/rocketamf/pure/helpers/string_cache.rb', line 4

def initialize
  @cache_index = 0
end

Instance Method Details

#add_obj(str) ⇒ Object



8
9
10
11
# File 'lib/rocketamf/pure/helpers/string_cache.rb', line 8

def add_obj(str)
  self[str]    = @cache_index
  @cache_index += 1
end