Completed
Push — dev ( 36eb97...6cb2fc )
by Fike
01:01
created

Injector.inject()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 3
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 3
loc 3
rs 10
cc 1
1
# frozen_string_literal: true
2
3
# rubocop:disable Lint/UnusedMethodArgument
4
5
require_relative 'interface'
6
7
module AMA
8
  module Entity
9 View Code Duplication
    class Mapper
1 ignored issue
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
10
      module API
11
        # Class that proxies attribute setting on target entity. That allows
12
        # tricks like virtual attribute handling or multi-value attribute
13
        # handling (like in hash or array)
14
        class Injector < Interface
15
          # :nocov:
16
          # Injects passed attribute into entity.
17
          #
18
          # @param [Object] entity
19
          # @param [AMA::Entity::Mapper::Type] type
20
          # @param [AMA::Entity::Mapper::Type::Attribute] attribute
21
          # @param [Object] value
22
          # @param [AMA::Entity::Mapper::Context] context
23
          def inject(entity, type, attribute, value, context = nil)
24
            abstract_method
25
          end
26
          # :nocov:
27
        end
28
      end
29
    end
30
  end
31
end
32