Class: RocketAMF::Pure::StringCache
- Inherits:
-
Hash
- Object
- Hash
- RocketAMF::Pure::StringCache
- Defined in:
- lib/rocketamf/pure/helpers/string_cache.rb
Overview
:nodoc:
Instance Method Summary collapse
- #add_obj(str) ⇒ Object
-
#initialize ⇒ StringCache
constructor
A new instance of StringCache.
Constructor Details
#initialize ⇒ StringCache
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 |