Sha256: 73fd2802b13cb5400b0b52738988bfd2deb0ab36d2df19a5f197bc8f29db24ab

Contents?: true

Size: 551 Bytes

Versions: 1

Compression:

Stored size: 551 Bytes

Contents

module Substation
  module Processor

    # A processor that wraps output data in a new handler instance
    class Wrapper

      include Outgoing
      include Concord.new(:handler)

      # Wrap response data in an instance of {#handler}
      #
      # @param [Response] response
      #   the response to process
      #
      # @return [Response]
      #
      # @api private
      def call(response)
        respond_with(response, handler.new(response.output))
      end

    end # class Wrapper
  end # module Processor
end # module Substation

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
substation-0.0.8 lib/substation/processor/wrapper.rb