Completed
Push — master ( 74519f...bcfd93 )
by Marcelo
40s
created

ArrayOf.coerce_not_nil()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 5
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 5
loc 5
rs 10
cc 1
1
module Koine
2
  module Attributes
3
    module Adapter
4 View Code Duplication
      class ArrayOf < Base
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5
        def initialize(adapter)
6
          @adapter = adapter
7
          with_default_value([])
8
        end
9
10
        def for_values
11
          @adapter
12
        end
13
14
        private
15
16
        def coerce_not_nil(collectionOfValues)
17
          secure do
18
            collectionOfValues.map { |value| @adapter.coerce(value) }
19
          end
20
        end
21
      end
22
    end
23
  end
24
end
25