Skip to content

Instantly share code, notes, and snippets.

@reasonset
Created August 26, 2019 09:37
Show Gist options
  • Save reasonset/4512de0061a05384223c5321f0764a6c to your computer and use it in GitHub Desktop.
Save reasonset/4512de0061a05384223c5321f0764a6c to your computer and use it in GitHub Desktop.
Stella LogicのContextsを結合する
#!/usr/bin/ruby
require 'yaml'
logic = {}
File.open(ARGV.shift) do |f|
logic = YAML.load f
end
ARGV.each do |fn|
File.open(fn) {|f| logic["Context"].merge! YAML.load(f)["Context"] }
end
YAML.dump logic, STDOUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment