We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to merge some new info into a existing yaml document
gem 'psych-comments' require "psych" require "psych/comments" content = ARGV.map { |f| File.read(f) } content.unshift STDIN.read unless STDIN.tty? asts = content.map { |c| Psych::Comments.parse_stream(c) } asts[1...].each do |ast| asts[0].children[0].children.append ast.children[0].children asts[0].end_line += 1 end puts Psych::Comments.emit_yaml(asts[0])
no luck though, got any hints ?
echo 'a: 1 # a' > a echo 'b: 2 # b' > b ruby merge a b
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to merge some new info into a existing yaml document
no luck though, got any hints ?
The text was updated successfully, but these errors were encountered: