Created
July 14, 2010 15:40
-
-
Save nevyn/475589 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 macruby | |
Dir["*.plist"].each { |f| | |
d = NSDictionary.dictionaryWithContentsOfFile(f) | |
cr = d["description"] | |
cr.writeToFile(f+".crash", atomically:false) | |
} | |
# Could probably use ARGF too |
I hope they ship MacRuby with 10.7 “Ceiling Cat”. It’s brilliant.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yea, its pretty cool. FWIW, I prefer using Hash to NSDictionary, since you get all the Ruby goodness on top of the NSDictionary api: