This repository has been archived on 2025-08-18. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
plistifier/lib/cfpropertylist
2010-06-18 15:03:41 +02:00
..
LICENSE first commit 2010-06-12 17:59:50 +02:00
rbBinaryCFPropertyList.rb first commit 2010-06-12 17:59:50 +02:00
rbCFPlistError.rb added 2.0.4 CFPropertyList 2010-06-18 14:52:31 +02:00
rbCFPropertyList.rb added 2.0.4 CFPropertyList 2010-06-18 14:52:31 +02:00
rbCFTypes.rb first commit 2010-06-12 17:59:50 +02:00
rbXMLCFPropertyList.rb first commit 2010-06-12 17:59:50 +02:00
README first commit 2010-06-12 17:59:50 +02:00

CFPropertyList implementation
class to read, manipulate and write both XML and binary property list
files (plist(5)) as defined by Apple

== Example

  # create a arbitrary data structure of basic data types
  data = {
    'name' => 'John Doe',
    'missing' => true,
    'last_seen' => Time.now,
    'friends' => ['Jane Doe','Julian Doe'],
    'likes' => {
      'me' => false
    }
  }

  # create CFPropertyList::List object
  plist = CFPropertyList::List.new

  # call CFPropertyList.guess() to create corresponding CFType values
  plist.value = CFPropertyList.guess(data)

  # write plist to file
  plist.save("example.plist", CFPropertyList::List::FORMAT_BINARY)

  # … later, read it again
  plist = CFPropertyList::List.new("example.plist")
  data = CFPropertyList.native_types(plist.value)

Author::    Christian Kruse (mailto:cjk@wwwtech.de)
Copyright:: Copyright (c) 2010
License::   Distributes under the same terms as Ruby