Skip to content

Conversation

@piotrb
Copy link
Contributor

@piotrb piotrb commented Apr 15, 2020

This adds a new type :varied which creates a bit more flexibility on how data is retrieved.

Had an issue with a particular config format where there was an array that had some :value elements and some :hash elements.

eg:

["one", "two", {three: "four"}]

can now be represented properly.

mapping.each do |mapping_key, mapping_info|
source.each do |key, value|
source.keys.sort.each do |key|
value = source[key]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have just .sort{|k,v| k} to not need the extra manual assignment

@mathieujobin
Copy link

Maybe a README update would be nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants