Class: ClusterId::V1::Deserializer

Inherits:
Object
  • Object
show all
Defined in:
lib/clusterid/v1/serialization.rb

Overview

The abstract base class of all custom deserializtion logic.

Since:

  • 1.0.0

Direct Known Subclasses

NullDeserializer

Instance Method Summary collapse

Instance Method Details

#to_data_centre(i) ⇒ T

Returns the deserialized data centre.

Parameters:

  • i (Integer)

    the serialized data centre

Returns:

  • (T)

    the deserialized data centre

Raises:

  • (NotImplementedError)

Since:

  • 1.0.0



36
37
38
# File 'lib/clusterid/v1/serialization.rb', line 36

def to_data_centre(i)
  raise NotImplementedError
end

#to_environment(i) ⇒ T

Returns the deserialized environment.

Parameters:

  • i (Integer)

    the serialized environment

Returns:

  • (T)

    the deserialized environment

Raises:

  • (NotImplementedError)

Since:

  • 1.0.0



30
31
32
# File 'lib/clusterid/v1/serialization.rb', line 30

def to_environment(i)
  raise NotImplementedError
end

#to_type_id(i) ⇒ T

Returns the deserialized type ID.

Parameters:

  • i (Integer)

    the serialized type ID

Returns:

  • (T)

    the deserialized type ID

Raises:

  • (NotImplementedError)

Since:

  • 1.0.0



42
43
44
# File 'lib/clusterid/v1/serialization.rb', line 42

def to_type_id(i)
  raise NotImplementedError
end