Sha256: d852554ea489eded603382f5a9fff612bc20fd67561d14e83121883efc624177

Contents?: true

Size: 595 Bytes

Versions: 2

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

module WeakSwaggerParameters
  module Definitions
    class Path < ParamContainer
      def string(name, description, options = {})
        register_definition(:string, name, description, options)
      end

      def integer(name, description, options = {})
        register_definition(:integer, name, description, options)
      end

      private

      def register_definition(type, name, description, options)
        @child_definitions << WeakSwaggerParameters::Definitions::Parameter.new(:path, type, name, description, options)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
weak_swagger_parameters-0.6.0 lib/weak_swagger_parameters/definitions/path.rb
weak_swagger_parameters-0.5.0 lib/weak_swagger_parameters/definitions/path.rb