Conversation
Collaborator
There was a problem hiding this comment.
I don't like that #to_toml accepts any args.
Author
There was a problem hiding this comment.
Would you prefer that only Array.to_toml and Hash.to_toml accept path or do you not like that it defaults to an empty string?
Collaborator
There was a problem hiding this comment.
I want to be the same as everyone else so it's expected behaviour. Does #to_json and similar converting methods accept paths? If so, can you link me to it? Do we need this?
Author
There was a problem hiding this comment.
The path is necessary so that we can pass along the parent keys for nested hashes. I can try and think of a replacement if you'd like.
Collaborator
There was a problem hiding this comment.
ah i guess it's ok to leave it as long as it has a default. thanks!
parkr
added a commit
that referenced
this pull request
Oct 1, 2014
Support array of tables Fixes #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a pretty hefty refactor. I found it easier to understand toml
generation with the majority of the generation code within the
monkey_patch rather than the generator class.
Please feel free to mark up my PR with comments as my ruby style may be a bit funky.