Sha256: fdfd0b0601bd10c1233390ca5591bcc01ab1d89cb812bd309543c4f446770e15

Contents?: true

Size: 653 Bytes

Versions: 14

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  class Config
    # Abstract base class for Doorkeeper and it's extensions configuration
    # builder. Instantiates and validates gem configuration.
    #
    class AbstractBuilder
      attr_reader :config

      # @param [Class] config class
      #
      def initialize(config = Config.new, &block)
        @config = config
        instance_eval(&block)
      end

      # Builds and validates configuration.
      #
      # @return [Doorkeeper::Config] config instance
      #
      def build
        @config.validate! if @config.respond_to?(:validate!)
        @config
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
doorkeeper-5.6.2 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.6.1 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.6.0 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.6.0.rc2 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.6.0.rc1 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.5.4 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.5.3 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.5.2 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.5.1 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.5.0 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.5.0.rc2 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.5.0.rc1 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.4.0 lib/doorkeeper/config/abstract_builder.rb
doorkeeper-5.4.0.rc2 lib/doorkeeper/config/abstract_builder.rb