Class: Synapse::Serialization::DeserializedObject
- Inherits:
-
Object
- Object
- Synapse::Serialization::DeserializedObject
- Defined in:
- lib/synapse/serialization/lazy_object.rb
Overview
Deserialized object that has (nearly) the same interface as a lazy object
Instance Attribute Summary collapse
- #deserialized ⇒ Object readonly
-
#serializer ⇒ Serializer
readonly
This will always be nil.
- #type ⇒ Class readonly
Instance Method Summary collapse
-
#deserialized? ⇒ Boolean
Returns true if this object has been deserialized already; always true.
- #initialize(deserialized) ⇒ undefined constructor
Constructor Details
#initialize(deserialized) ⇒ undefined
49 50 51 52 |
# File 'lib/synapse/serialization/lazy_object.rb', line 49 def initialize(deserialized) @deserialized = deserialized @type = deserialized.class end |
Instance Attribute Details
#deserialized ⇒ Object (readonly)
39 40 41 |
# File 'lib/synapse/serialization/lazy_object.rb', line 39 def deserialized @deserialized end |
#serializer ⇒ Serializer (readonly)
Returns This will always be nil.
42 43 44 |
# File 'lib/synapse/serialization/lazy_object.rb', line 42 def serializer @serializer end |
#type ⇒ Class (readonly)
45 46 47 |
# File 'lib/synapse/serialization/lazy_object.rb', line 45 def type @type end |
Instance Method Details
#deserialized? ⇒ Boolean
Returns true if this object has been deserialized already; always true
56 57 58 |
# File 'lib/synapse/serialization/lazy_object.rb', line 56 def deserialized? true end |