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

AttributeValidator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A validate() 0 3 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