Sha256: b504ad905352d67ecc2c8a33c52f2b5c754e443361a0f393912c8ed5a2d8d68a

Contents?: true

Size: 444 Bytes

Versions: 12

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true

module Pakyow
  module Actions
    # Parses the request body with registered parsers.
    #
    class InputParser
      def call(connection)
        if (parser = parser(connection)) && (input = connection.input) && !input.empty?
          connection.input_parser = parser
        end
      end

      private

      def parser(connection)
        Pakyow.input_parsers[connection.type]
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pakyow-core-1.0.6 lib/pakyow/actions/input_parser.rb
pakyow-core-1.0.5 lib/pakyow/actions/input_parser.rb
pakyow-core-1.0.4 lib/pakyow/actions/input_parser.rb
pakyow-core-1.0.3 lib/pakyow/actions/input_parser.rb
pakyow-core-1.0.2 lib/pakyow/actions/input_parser.rb
pakyow-core-1.0.1 lib/pakyow/actions/input_parser.rb
pakyow-core-1.0.0 lib/pakyow/actions/input_parser.rb
pakyow-core-1.0.0.rc5 lib/pakyow/environment/actions/input_parser.rb
pakyow-core-1.0.0.rc4 lib/pakyow/environment/actions/input_parser.rb
pakyow-core-1.0.0.rc3 lib/pakyow/environment/actions/input_parser.rb
pakyow-core-1.0.0.rc2 lib/pakyow/environment/actions/input_parser.rb
pakyow-core-1.0.0.rc1 lib/pakyow/environment/actions/input_parser.rb