This PR allows assign to take a map of values, like Phoenix does.
Motivation and Context
When working on a Scenic project, we captured the entire scene.assigns and transformed a few values. We received an error when trying to assign this resulting map back to the scene, since scene.assigns gave us a map. We referenced Phoenix's behavior of assigns since that was motivation for bringing it into Scenic, and Phoenix does in fact allow both a keyword list or map as assigns. Therefore we thought we should allow for assigning a map in Scenic as well.
Happy to discuss if this either isn't desired or should be implemented differently.
Types of changes
[ ] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to
not work as expected)
[x] Improvement/refactoring (non-breaking change that doesn't add any feature
but make things better)
Checklist
[x] Check other PRs and make sure that the changes are not done yet.
Description
This PR allows
assign
to take a map of values, like Phoenix does.Motivation and Context
When working on a Scenic project, we captured the entire
scene.assigns
and transformed a few values. We received an error when trying to assign this resulting map back to the scene, sincescene.assigns
gave us a map. We referenced Phoenix's behavior ofassigns
since that was motivation for bringing it into Scenic, and Phoenix does in fact allow both a keyword list or map as assigns. Therefore we thought we should allow for assigning a map in Scenic as well.Happy to discuss if this either isn't desired or should be implemented differently.
Types of changes
Checklist