Sha256: 4149eaac78ae16c655a55108355e505d95a5de1279ec7dd9f78878ed88ad0fd6

Contents?: true

Size: 420 Bytes

Versions: 2

Compression:

Stored size: 420 Bytes

Contents

# frozen_string_literal: true

module WeakSwaggerParameters
  module Definitions
    module LeafDefinition
      def apply_validations(parent_node)
        type = @options[:type]
        name = @options[:name]

        validation_options = WeakSwaggerParameters::Services::WeakParametersOptionsAdapter.adapt(@options)
        parent_node.instance_eval { send type, name, validation_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/leaf_definition.rb
weak_swagger_parameters-0.5.0 lib/weak_swagger_parameters/definitions/leaf_definition.rb