Code Duplication    Length = 5-6 lines in 2 locations

lib/mapper/type/attribute.rb 2 locations

@@ 84-89 (lines=6) @@
81
              validator: nil,
82
              aliases: []
83
            }
84
          end
85
86
          # @param [Mapper::Type] owner
87
          # @param [Symbol] name
88
          # @param [Array<Mapper::Type>] types
89
          # @param [Hash<Symbol, Object] options
90
          def initialize(owner, name, *types, **options)
91
            @owner = validate_owner!(owner)
92
            @name = validate_name!(name)
@@ 91-95 (lines=5) @@
88
          # @param [Array<Mapper::Type>] types
89
          # @param [Hash<Symbol, Object] options
90
          def initialize(owner, name, *types, **options)
91
            @owner = validate_owner!(owner)
92
            @name = validate_name!(name)
93
            @types = validate_types!(types)
94
            self.class.defaults.each do |key, value|
95
              value = options.fetch(key, value)
96
              unless value.nil?
97
                set_object_attribute(self, key, options.fetch(key, value))
98
              end