Sha256: c0eca8dbcdc27a3cd389decce94d1ea56bebd33df7ac0862332bc2e38ede42fd

Contents?: true

Size: 555 Bytes

Versions: 1

Compression:

Stored size: 555 Bytes

Contents

module Substation
  module Processor

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

      include Outgoing
      include Concord.new(:env, :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.data))
      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.10.beta2 lib/substation/processor/wrapper.rb