Sha256: 8f4030aca5c925d763c307ee14942143d036f791465fe322811122efca49c444

Contents?: true

Size: 331 Bytes

Versions: 3

Compression:

Stored size: 331 Bytes

Contents

# frozen_string_literal: true

module AdequateSerialization
  module Steps
    class SerializeStep < PassthroughStep
      def apply(response)
        object = response.object
        serialized = object.class.serializer.serialize(object, response.opts)

        apply_next(response.mutate(serialized))
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
adequate_serialization-0.1.1 lib/adequate_serialization/steps/serialize_step.rb
adequate_serialization-0.1.0 lib/adequate_serialization/steps/serialize_step.rb
adequate_serialization-0.0.1 lib/adequate_serialization/steps/serialize_step.rb