Created
March 24, 2016 11:41
-
-
Save daxadax/5849ab154648dff87744 to your computer and use it in GitHub Desktop.
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
class DumpObjects | |
attr_reader :objects, :output | |
def initialize(objects, output_path) | |
@objects = objects | |
@output = output_path | |
end | |
def run | |
File.open(output_path, "w") do |file| | |
objects.each do |object| | |
file.puts YAML::dump(object) | |
file.puts "" | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment