Sha256: 0bd35fc6df4d2c7556c0f71e901eb0ae8ba90c2df6ab0f1e34f6f1855a0321f0

Contents?: true

Size: 877 Bytes

Versions: 3

Compression:

Stored size: 877 Bytes

Contents

Simple in-memory database using ActiveModel.

Primarily developed for Bowline applications.
http://github.com/maccman/bowline

Supports:
  * Serialisation
  * Validations
  * Callbacks
  * Observers
  * Dirty (Changes)
  * Persistance

Examples:

  require "supermodel"

  class Test < SuperModel::Base
  end

  t = Test.new
  t.name = "foo"
  t.save #=> true

  Test.all
  Test.first
  Test.last
  Test.find_by_name('foo)

You can use a random ID rather than the object ID:
  
  class Test < SuperModel::Base
    include SuperModel::RandomID
  end
  
  t = Test.create(:name => "test")
  t.id #=> "7ee935377bb4aecc54ad4f9126"
  
You can persist objects to disk on startup/shutdown
  
  class Test < SuperModel::Base
    include SuperModel::Persist::Model
  end
  
  SuperModel::Persist.path = "dump.db"
  SuperModel::Persist.load

  at_exit {
    SuperModel::Persist.dump
  }

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
supermodel-0.0.5 README
supermodel-0.0.4 README
supermodel-0.0.2 README