Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I edited the description to explicitly explain the constraints on which fields are stored. Thank you for your feedback!
Thanks for the solution. Together with mortonfox's, these are both much more readable than mine. The only criticism I have regarding your solution is with
i.delete('description')
. Even though it fits the requirements of the kata perfectly, my intention with limiting the amount of keys for each item in the final Hash was more of a white-list(admitting only desired keys) rather than a black-list(deleting each non-desired key) approach. This is because I had in mind an inventory where each items has many more key-values than the ones we'd want to keep in the chart.However I certainly did not make that intention clear enough, therefore this solution serves as significant feedback, much appreciated!
Although this does not end up being a one-liner ( which is by default cool imo), it really enhances readability compared to my solution. thanks!
That while loop could be replaced by a simpler
sample(3)
:)I'm editing a kata I published some weeks ago (I unpublished it first). I changed most of the sections of the kata: 'Complete solution','Description', 'Initial Solution'... However when previeweing the successfully saved changes in the kata sections, the sections 'Initial solution' and 'Example Test Cases' appear totally unchanged. That is, their content is the same as before unpublishing the kata. Any ideas?