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-11.0.2 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-11.0.1 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-11.0.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-10.0.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-9.0.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-8.1.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-8.0.1 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-8.0.0 lib/rack/app/middlewares/payload/parser_setter.rb
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/rack-app-7.7.0/lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.7.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.6.5 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.6.4 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.6.3 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.6.2 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.6.1 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.6.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.5.2 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.5.1 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.5.0 lib/rack/app/middlewares/payload/parser_setter.rb
rack-app-7.4.0 lib/rack/app/middlewares/payload/parser_setter.rb