Class: ClusterId::V1::NullSerializer

Inherits:
Serializer show all
Defined in:
lib/clusterid/v1/null_serialization.rb

Overview

A default Serializer that returns 0 for all attributes.

Since:

  • 1.0.0

Instance Method Summary collapse

Instance Method Details

#from_data_centre(_) ⇒ 0

Zero method which ignores all data centre values.

Returns:

  • (0)

Since:

  • 1.0.0



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

def from_data_centre(_)
  0
end

#from_environment(_) ⇒ 0

Zero method which ignores all environment values.

Returns:

  • (0)

Since:

  • 1.0.0



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

def from_environment(_)
  0
end

#from_type_id(_) ⇒ 0

Zero method which ignores all type ID values.

Returns:

  • (0)

Since:

  • 1.0.0



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

def from_type_id(_)
  0
end