Created
January 21, 2019 19:31
-
-
Save davidbalbert/a72ad38ce1258043598bedb599574a27 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
#!/usr/bin/env ruby | |
nesting = 0 | |
ARGF.each_line do |l| | |
nesting -= l.count("}") | |
puts " "*nesting + l | |
nesting += l.count("{") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment