Skip to content

Instantly share code, notes, and snippets.

@MartinGonzalez
Created July 21, 2020 01:49
Show Gist options
  • Save MartinGonzalez/05abec8436cab05a6ff5ff2c9a3d4158 to your computer and use it in GitHub Desktop.
Save MartinGonzalez/05abec8436cab05a6ff5ff2c9a3d4158 to your computer and use it in GitHub Desktop.
write_json example
file_path = "./tmp/test.json"
hash = {
name: "Martin",
age: 30
}
write_json(
hash: hash,
file_path: file_path
)
puts(File.read(file_path))
#{
# "name": "Martin",
# "age": 30
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment