Sha256: a0f8ceb9d9db8882ed219342171700b444c5203eb737269f6387e0cca42fe9f6

Contents?: true

Size: 736 Bytes

Versions: 15

Compression:

Stored size: 736 Bytes

Contents

# frozen_string_literal: true

# :reek:Attribute
module SwaggerDocsGenerator
  # # Information element
  #
  # Create a Hash element for information to API doc.
  #
  # @see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#info-object
  class ConfigurationInfo
    attr_accessor :title, :description, :terms_of_service, :contact, :license,
                  :version

    # Initialize required element
    def initialize
      @title = 'Title Example API'
      @version = '1.0.0'
    end
  end

  class << self
    def configure_info
      block_given? ? yield(info) : info
    end

    def info
      @info ||= ConfigurationInfo.new
    end

    def version_ruby
      @info.version.humanize
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
swagger_docs_generator-0.5.1 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.5.0.pre.42 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.4.0 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.6 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.6.pre.34 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.5 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.5.pre.31 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.4.pre.26 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.4 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.4.pre.23 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.3 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.2 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.1 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.0.pre.19 lib/swagger_docs_generator/configuration/configuration_info.rb
swagger_docs_generator-0.3.0.pre.18 lib/swagger_docs_generator/configuration/configuration_info.rb