| Total Complexity | 1 |
| Total Lines | 14 |
| Duplicated Lines | 100 % |
| Changes | 0 | ||
Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
| 1 | # frozen_string_literal: true |
||
| 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 |
||
| 32 |