Class: AMF::Pure::SerializerCache::StringCache

Inherits:
Hash
  • Object
show all
Defined in:
lib/amf/pure/serializer.rb

Instance Method Summary collapse

Constructor Details

#initializeStringCache

Returns a new instance of StringCache.



204
205
206
# File 'lib/amf/pure/serializer.rb', line 204

def initialize
  @cache_index = 0
end

Instance Method Details

#add_obj(str) ⇒ Object



208
209
210
211
# File 'lib/amf/pure/serializer.rb', line 208

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