Skip to content

Instantly share code, notes, and snippets.

@daxadax
Created March 24, 2016 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daxadax/5849ab154648dff87744 to your computer and use it in GitHub Desktop.
Save daxadax/5849ab154648dff87744 to your computer and use it in GitHub Desktop.
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