ngtk/open_api_annotator

View on GitHub
lib/open_api_annotator/configurable.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module OpenApiAnnotator
  module Configurable
    extend ActiveSupport::Concern

    class_methods do
      def configure(&block)
        block.call(config)
        config.validate!
      end

      def config
        @config ||= Config.new
      end
    end
  end
end