A small JSON ODM.
Tyrion's goal is to provide a fast (as in easy to setup) and dirty unstructured document store.
Tyrion uses a folder to store JSON files, one for each Tyrion document defined. Each file is an array of homogeneous documents (much like collections).
Tyrion::Connection.path = "/a/folder"
class Post include Tyrion::Document field :title field :body field :rank end
post = Post.create :title => "Hello", :body => "Hi there, ..." post.save
# Insta-save with ! Post.create! :title => "Hello", :body => "Hi there, ..."
post = Post.create :title => "Hello", :body => "Hi there, ..." post.delete
Post.delete_all # You get the idea
Post.where :title => /^Hello/
find_by_attribute: just the first match
Post.find_by_title "Hello" Post.find_by_body /^Hi there/i
where: all matching documents
Post.where :title => /^Hello/, :rank => 3