Sha256: 8cf4b0f9c03c9413468a442911520fbf239263f5462655102050c08c70bf76a5

Contents?: true

Size: 560 Bytes

Versions: 7

Compression:

Stored size: 560 Bytes

Contents

module RspecApiDocs
  class << self
    attr_accessor :configuration

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

  def self.configure
    self.configuration ||= Config.new
    yield configuration
  end

  # Used to control the behaviour of the gem.
  class Config
    attr_accessor \
      :output_dir,
      :renderer,
      :validate_params,
      :exclude_request_headers

    def initialize
      @output_dir = 'docs'
      @renderer = :json
      @validate_params = true
      @exclude_request_headers = []
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rspec-api-docs-0.12.0 lib/rspec_api_docs/config.rb
rspec-api-docs-0.11.0 lib/rspec_api_docs/config.rb
rspec-api-docs-0.10.0 lib/rspec_api_docs/config.rb
rspec-api-docs-0.9.0 lib/rspec_api_docs/config.rb
rspec-api-docs-0.8.0 lib/rspec_api_docs/config.rb
rspec-api-docs-0.7.0 lib/rspec_api_docs/config.rb
rspec-api-docs-0.6.0 lib/rspec_api_docs/config.rb