Sha256: 1ae49a258d5782436c231ba94b43efe7ebe79d3cb48a2851b857fa4ea24a985d

Contents?: true

Size: 570 Bytes

Versions: 12

Compression:

Stored size: 570 Bytes

Contents

# frozen_string_literal: true

module R2OAS
  module AppConfiguration
    class Server
      DEFAULT_URL = 'http://localhost:3000'
      DEFAULT_DESCRIPTION = 'localhost'

      VALID_OPTIONS_KEYS = [
        :data
      ].freeze

      attr_accessor *VALID_OPTIONS_KEYS

      def initialize
        set_default
      end

      def configure
        yield self
      end

      private

      def set_default
        self.data = [
          {
            url: DEFAULT_URL,
            description: DEFAULT_DESCRIPTION
          }
        ]
      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/server.rb
r2-oas-0.4.1 lib/r2-oas/app_configuration/server.rb
r2-oas-0.4.0 lib/r2-oas/app_configuration/server.rb
r2-oas-0.3.4 lib/r2-oas/app_configuration/server.rb
r2-oas-0.3.3 lib/r2-oas/app_configuration/server.rb
r2-oas-0.3.2 lib/r2-oas/app_configuration/server.rb
r2-oas-0.3.1 lib/r2-oas/app_configuration/server.rb
r2-oas-0.3.0 lib/r2-oas/app_configuration/server.rb
r2-oas-0.2.0 lib/r2-oas/app_configuration/server.rb
r2-oas-0.1.3 lib/r2-oas/app_configuration/server.rb
r2-oas-0.1.2 lib/r2-oas/app_configuration/server.rb
r2-oas-0.1.0 lib/r2-oas/app_configuration/server.rb