Conditions | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # frozen_string_literal: true |
||
22 | def enumerate(entity, type, _context = nil) |
||
23 | ::Enumerator.new do |yielder| |
||
24 | type.attributes.values.reject(&:virtual).each do |attribute| |
||
25 | next unless object_variable_exists(entity, attribute.name) |
||
26 | value = object_variable(entity, attribute.name) |
||
27 | segment = Path::Segment.attribute(attribute.name) |
||
28 | yielder << [attribute, value, segment] |
||
29 | end |
||
30 | end |
||
31 | end |
||
32 | end |
||
38 |