Sha256: f22c9f2b6f9e6df56d3084e1019f084e66c50bf3992dd5ffa078dc518836e143

Contents?: true

Size: 569 Bytes

Versions: 12

Compression:

Stored size: 569 Bytes

Contents

# frozen_string_literal: true

require_relative 'swagger/ui'
require_relative 'swagger/editor'

module R2OAS
  module AppConfiguration
    class Swagger
      DEFAULT_EDITOR = Editor.new
      DEFAULT_UI     = UI.new

      VALID_OPTIONS_KEYS = %i[
        editor
        ui
      ].freeze

      attr_accessor *VALID_OPTIONS_KEYS

      def initialize
        set_default
      end

      def configure
        yield self
      end

      private

      def set_default
        self.editor = DEFAULT_EDITOR
        self.ui     = DEFAULT_UI
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
r2-oas-0.5.0 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.4.1 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.4.0 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.3.4 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.3.3 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.3.2 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.3.1 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.3.0 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.2.0 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.1.3 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.1.2 lib/r2-oas/app_configuration/swagger.rb
r2-oas-0.1.0 lib/r2-oas/app_configuration/swagger.rb