Class: AMF::Pure::CacheStrings

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

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeCacheStrings

Returns a new instance of CacheStrings.



4
5
6
# File 'lib/amf/pure/helpers/cache_strings.rb', line 4

def initialize
  @cache_index = 0
end

Instance Method Details

#add_string(value) ⇒ Object



8
9
10
11
# File 'lib/amf/pure/helpers/cache_strings.rb', line 8

def add_string(value)
  self[value]    = @cache_index
  @cache_index += 1
end