You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While segments with children respond to :children, segments (such as MSH) do not. This seemed to not match my abstraction usability expectation. With the current implementation, I'll have to write code to detect if Segment has a child or not rather than just getting no children.
I do see that there is a :has_children? method which helps, but it just feels off to have to call a method like this to prevent this type of StandardError.
The text was updated successfully, but these errors were encountered:
I agree this is an issue, I've seen it more than a few times, we probably want to fix this in a major release.
I think the solution is always have children and treat it as an empty collection for segments which do not have one. I believe this would be change that will break compatibility for those who depend on the method children being only available for segments with children.
While segments with children respond to
:children
, segments (such as MSH) do not. This seemed to not match my abstraction usability expectation. With the current implementation, I'll have to write code to detect if Segment has a child or not rather than just getting no children.I do see that there is a :has_children? method which helps, but it just feels off to have to call a method like this to prevent this type of StandardError.
The text was updated successfully, but these errors were encountered: