Hello,
I am noticing two patterns:
- I am creating a mapper for each unique combination of #combine inputs
- I having a lot of repeating code in my mappers across different relations when I combine associations.
Do you have any suggestion on how to not repeat code in different mappers OR even the same mapper?
For example I have this block in 3 different mappers OR repeating in the same mapper:
guard(->(issue) { !issue[:feature].nil? }) do
map_value(:feature) do
unwrap :issue, [:comments]
reject_keys [:issue]
constructor_inject Feature
end
end