Skip to content

Instantly share code, notes, and snippets.

@glennpratt
Created October 7, 2011 17:51
Show Gist options
  • Select an option

  • Save glennpratt/1270922 to your computer and use it in GitHub Desktop.

Select an option

Save glennpratt/1270922 to your computer and use it in GitHub Desktop.
Glenn-Pratts-MacBook-Pro in ~
○ → sudo gem install plist
Fetching: plist-3.1.0.gem (100%)
Successfully installed plist-3.1.0
1 gem installed
Installing ri documentation for plist-3.1.0...
Installing RDoc documentation for plist-3.1.0...
Glenn-Pratts-MacBook-Pro in ~
○ → irb
>> require 'plist'
=> true
>> Plist::Emit.dump({:nid => 123, :title => 'Hello!'})
=> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>nid</key>\n\t<integer>123</integer>\n\t<key>title</key>\n\t<string>Hello!</string>\n</dict>\n</plist>\n"
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment