Simple ‘In-memory’ models description with associations.

Primarily developed to create or parse JSON to easily communicate with any REST API. exemple: github.com/antlegrand/sitescout

Examples:

require "simplemodel"
class Link < SimpleModel::Base
    include SimpleModel::Association
    define_attributes :rel, :href
  end

  class Offer < SiteT::Models::Base
    include SimpleModel::Association
    define_attributes :name, :offerId, :defaultRevenue
    one :onelink, :class_name => Link
    many :links, :class_name => Link
    many :toto, :class_name => Link
    one :titi, :class_name => Link

class Test < SuperModel::Base
end