Completed
Push — dev ( 6cb2fc...405831 )
by Fike
58s
created

AttributeValidator.validate()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
1
# frozen_string_literal: true
2
3
# rubocop:disable Lint/UnusedMethodArgument
4
5
require_relative 'interface'
6
require_relative '../mixin/errors'
7
8
module AMA
9
  module Entity
10
    class Mapper
11
      module API
12
        # Custom validator for attribute
13
        class AttributeValidator < Interface
14
          include Mixin::Errors
15
          # :nocov:
16
          # @param [Object] value Attribute value
17
          # @param [Mapper::Type::Attribute] attribute
18
          # @param [Mapper::Context] context
19
          # @return [Array<String>] List of violations
20
          def validate(value, attribute, context)
21
            abstract_method
22
          end
23
          # :nocov:
24
        end
25
      end
26
    end
27
  end
28
end
29