Module: Moleculer::Serializers

Defined in:
lib/moleculer/serializers.rb,
lib/moleculer/serializers/json.rb

Defined Under Namespace

Classes: Json

Class Method Summary collapse

Class Method Details

.for(serializer) ⇒ Object



4
5
6
7
# File 'lib/moleculer/serializers.rb', line 4

def self.for(serializer)
  require_relative("serializers/#{serializer}")
  Serializers.const_get(serializer.to_s.split("_").map(&:capitalize).join)
end