Sha256: 10033b9af080a7accbfdc1f04218bb8b2684d9b923f6df2af15d244f8114b53f

Contents?: true

Size: 608 Bytes

Versions: 2

Compression:

Stored size: 608 Bytes

Contents

# frozen_string_literal: true

module SwaggerDocsGenerator
  # # Metadata generated
  #
  # Metadata generated in swagger json file
  class Metadata
    def initialize
      @config = nil
    end

    def construct_swagger_file
      hash = {}
      self.class.protected_instance_methods.each do |method|
        hash.merge!(send(method)) unless @config.send(method).blank?
      end
      hash
    end

    private

    attr_reader :config
  end
end

require 'swagger_docs_generator/metadata/configuration'
require 'swagger_docs_generator/metadata/info'
require 'swagger_docs_generator/metadata/controller'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
swagger_docs_generator-0.1.1 lib/swagger_docs_generator/metadata/metadata.rb
swagger_docs_generator-0.1.0 lib/swagger_docs_generator/metadata/metadata.rb