Class: RestfulX::AMF::Pure::SerializerCache
- Inherits:
-
Hash
- Object
- Hash
- RestfulX::AMF::Pure::SerializerCache
- Defined in:
- lib/restfulx/amf/pure/serializer.rb
Instance Attribute Summary collapse
-
#cache_index ⇒ Object
Returns the value of attribute cache_index.
Instance Method Summary collapse
- #cache(obj) ⇒ Object
-
#initialize ⇒ SerializerCache
constructor
A new instance of SerializerCache.
Constructor Details
#initialize ⇒ SerializerCache
Returns a new instance of SerializerCache.
34 35 36 |
# File 'lib/restfulx/amf/pure/serializer.rb', line 34 def initialize @cache_index = 0 end |
Instance Attribute Details
#cache_index ⇒ Object
Returns the value of attribute cache_index.
32 33 34 |
# File 'lib/restfulx/amf/pure/serializer.rb', line 32 def cache_index @cache_index end |
Instance Method Details
#cache(obj) ⇒ Object
38 39 40 41 |
# File 'lib/restfulx/amf/pure/serializer.rb', line 38 def cache(obj) self[obj] = @cache_index @cache_index += 1 end |