Giter Club home page Giter Club logo

cfpropertylist's Introduction

CFPropertyList implementation
class to read, manipulate and write both XML and binary property list
files (plist(5)) as defined by Apple. Have a look at CFPropertyList::List
for more documentation.

== Installation

You could either use ruby gems and install it via

  gem install CFPropertyList

or you could clone this repository and place it somewhere in your load path.

== Example
  require 'cfpropertylist'

  # 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(:file => "example.plist")
  data = CFPropertyList.native_types(plist.value)

Author::    Christian Kruse (mailto:[email protected])
Copyright:: Copyright (c) 2010
License::   MIT License

cfpropertylist's People

Contributors

ckruse avatar sjmadsen avatar gregwebs avatar dreamcat4 avatar kaomte avatar haus avatar ojab avatar cantino avatar siuying avatar improbability avatar mschmidt avatar paynerc avatar rgov avatar smparkes avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.