Class: RubySol::Pure::SerializerCache::StringCache
- Inherits:
-
Hash
- Object
- Hash
- RubySol::Pure::SerializerCache::StringCache
- Defined in:
- lib/ruby_sol/pure/serializer.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.
462 463 464 |
# File 'lib/ruby_sol/pure/serializer.rb', line 462 def initialize @cache_index = 0 end |
Instance Method Details
#add_obj(str) ⇒ Object
466 467 468 469 |
# File 'lib/ruby_sol/pure/serializer.rb', line 466 def add_obj str self[str] = @cache_index @cache_index += 1 end |