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

Factory.create()   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
        # This interface depicts factory for class instance creation.
12
        class Factory < Interface
13
          # :nocov:
14
          # @param [AMA::Entity::Mapper::Type] type Type that requires creation.
15
          #   While most probably it wouldn't be necessary, it is unknown until
16
          #   creation which exact type will be used (altering type parameters
17
          #   results in new type creation)
18
          # @param [Object] data Data that will be used for object creation.
19
          #   May be of any type or even nil.
20
          # @param [AMA::Entity::Mapper::Context] context
21
          # @return [Object] Object of passed type.
22
          def create(type, data = nil, context = nil)
23
            abstract_method
24
          end
25
          # :nocov:
26
        end
27
      end
28
    end
29
  end
30
end
31