Class: AMF::Pure::CacheStrings
- Inherits:
-
Hash
- Object
- Hash
- AMF::Pure::CacheStrings
- Defined in:
- lib/amf/pure/helpers/cache_strings.rb
Overview
:nodoc:
Instance Method Summary collapse
- #add_string(value) ⇒ Object
-
#initialize ⇒ CacheStrings
constructor
A new instance of CacheStrings.
Constructor Details
#initialize ⇒ CacheStrings
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 |