Sha256: 14f704a19cdc9fe6a7bec628e4606c26ed2907f92180f6fa87c591675570c084

Contents?: true

Size: 473 Bytes

Versions: 11

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

module SwaggerDocsGenerator
  module Actions
    # # Test :produces
    #
    # Complete consume field for action
    class Produces < Actions
      VALUE = :produces

      def initialize(data)
        super(VALUE)
        complete_hash(data)
      end

      private

      def complete_hash(data)
        default = ['application/json']
        raw = data.key?(key) ? data[key] : default
        hash[key] = raw
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
swagger_docs_generator-0.3.0.pre.18 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.2.0 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.2.0.pre.14 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.2.0.pre.13 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.2.0.pre.12 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.2.0.pre.11 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.2.0.pre.10 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.2.0.pre.9 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.1.2 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.1.1 lib/swagger_docs_generator/parser/actions/produces.rb
swagger_docs_generator-0.1.0 lib/swagger_docs_generator/parser/actions/produces.rb