Sha256: 9b8f74d6c77498fd8291c04d0eff1a205295dd11165b8146c02eed83fa50631a

Contents?: true

Size: 482 Bytes

Versions: 3

Compression:

Stored size: 482 Bytes

Contents

# frozen_string_literal: true

module AdequateSerialization
  module Steps
    class LastStep
      def apply(response)
        response.object
      end
    end

    class PassthroughStep
      attr_reader :next_step

      def initialize(next_step = LastStep.new)
        @next_step = next_step
      end

      def apply(response)
        apply_next(response)
      end

      private

      def apply_next(response)
        next_step.apply(response)
      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/passthrough_step.rb
adequate_serialization-0.1.0 lib/adequate_serialization/steps/passthrough_step.rb
adequate_serialization-0.0.1 lib/adequate_serialization/steps/passthrough_step.rb