Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

We could map with given data structure aswell #15

Open
arturictus opened this issue Apr 15, 2016 · 0 comments
Open

We could map with given data structure aswell #15

arturictus opened this issue Apr 15, 2016 · 0 comments

Comments

@arturictus
Copy link
Owner

arturictus commented Apr 15, 2016

I found this:
https://github.com/7Pikes/hash_map_hash

could be:

data = {
  'Items' => 10,
  'Total' => 123.0
}

mapping = {
  amount: 'Items',
  summ: 'Total'
}

HashMap.mapping(mapping).map(data)
@arturictus arturictus changed the title We could map with given data structure instead of a class We could map with given data structure aswell Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant