Sha256: 8c3c1be45cc89056ac2ac143cb20b4a79546baef9e81065be3ba89abf507b093

Contents?: true

Size: 566 Bytes

Versions: 9

Compression:

Stored size: 566 Bytes

Contents

# Allows a default Rack middleware implementation to be set,
# and then be optionally changed out for a different implementation
# after the app has been built.
# Used for allowing the authorization code to set after the
# `app = PactBroker::App.new` has been called

module Rack
  module PactBroker
    class ConfigurableMakeItLater
      def initialize default_clazz
        @clazz = default_clazz
      end

      def make_it_later clazz
        @clazz = clazz
      end

      def new *args, &block
        @clazz.new(*args, &block)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pact_broker-2.114.0 lib/rack/pact_broker/configurable_make_it_later.rb
pact_broker-2.113.2 lib/rack/pact_broker/configurable_make_it_later.rb
pact_broker-2.113.1 lib/rack/pact_broker/configurable_make_it_later.rb
pact_broker-2.113.0 lib/rack/pact_broker/configurable_make_it_later.rb
pact_broker-2.112.0 lib/rack/pact_broker/configurable_make_it_later.rb
pact_broker-2.111.0 lib/rack/pact_broker/configurable_make_it_later.rb
pact_broker-2.109.1 lib/rack/pact_broker/configurable_make_it_later.rb
pact_broker-2.109.0 lib/rack/pact_broker/configurable_make_it_later.rb
pact_broker-2.108.0 lib/rack/pact_broker/configurable_make_it_later.rb