Sha256: bc3992c94d359e12d4b070f7d70347004f07b93b55c770f594589d22bb1037fc

Contents?: true

Size: 637 Bytes

Versions: 1

Compression:

Stored size: 637 Bytes

Contents

# Structure

Structure is a Struct-like key/value container.

[![travis](https://secure.travis-ci.org/papercavalier/structure.png)](http://travis-ci.org/papercavalier/structure)

## Usage

Set up a model:

    require 'structure'

    class Person < Structure
      key  :name
      many :friends
    end

Do things with it:

    person = Person.new
    friend = Person.new
    person.friends << friend
    puts person.to_json
    => {"json_class":"Person","name":null,"friends":[{"json_class":"Person","name":null,"friends":[]}]}

Please see [the project page] [1] for more detailed info.

[1]: http://code.papercavalier.com/structure/

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
structure-0.14.1 README.md