Sha256: 8b11cbb6cb86cfc84b1c8edb42fb54d7a29fb355f2bbf833cc4580445da123b7

Contents?: true

Size: 485 Bytes

Versions: 52

Compression:

Stored size: 485 Bytes

Contents

class Rack::App::Middlewares::Payload::ParserSetter

  PARSER = ::Rack::App::Constants::ENV::PAYLOAD_PARSER
  PARSED = ::Rack::App::Constants::ENV::PARSED_PAYLOAD
  GETTER = ::Rack::App::Constants::ENV::PAYLOAD_GETTER

  def initialize(app, payload_builder)
    @payload_parser = payload_builder.parser.to_parser
    @app = app
  end

  def call(env)
    env[PARSER]= @payload_parser
    env[GETTER]= lambda { env[PARSED] ||= env[PARSER].parse_env(env) }
    @app.call(env)
  end

end

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
rack-app-7.3.2 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.3.1 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.3.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.2.2 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.2.1 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.2.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.1.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.0.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.8.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.7.1 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.7.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.6.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.5.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.4.1 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.4.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.3.3 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.3.2 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.3.1 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.3.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-6.2.0 lib/rack/app/middlewares/payload/parser_setter.rb