8 Matching Annotations
- Sep 2024
- Dec 2023
-
gitlab.com gitlab.com
-
hashie
-
- Nov 2022
-
-
Probaly still prefer: https://github.com/hashie/hashie over this
-
- Jun 2022
- Mar 2021
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
A proposal to specify the path for bury with classes as values of a hash arg: {}.bury(users: Array, 0 => Hash, name: Hash, something: 'Value') # {user: [{name: {something: 'Value'}]} So all absent nodes could be created via klass.new
Didn't understand it at first, but now I think it's a pretty clever/decent solution.
Just a bit more verbose than one might like...
At first I had reservations about the fact that this requires you to pass a hash ... or rather, once you start using a hash as your "list", you can't just "switch back" to an array (a "problem" I've noticed in RSpec, where you have some tags that are symbols, and some that are hashes: you have to list the symbols first:
describe 'thing', :happy_path, driver: :chrome
):{}.bury(users: Array, 0, 'Value')
But I think that's okay in practice. Just use a hash for all "elements" in your list:
{}.bury(users: Array, 0 => 'Value')
-
-
github.com github.com
-
No docs?!
[ Some docs here; First saw it here: ] https://bugs.ruby-lang.org/issues/11747#note-7
-