Mor
TODO: Write a gem description
Installation
Add this line to your application's Gemfile:
gem 'mor'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mor
Usage
require 'mor'
Mor.config do |dalli|
dalli['servers'] = "localhost:11211"
end
class Person
include Mor::Model
attr_accessor :id, :name
end
frank = Person.new(id: 1, name: "Frank")
frank.persisted? # false
frank.valid? # true
frank.save # true
Person.find(1) # <Person:0x007fc510892b00 @name="Frank">
Contributing
- Fork it ( http://github.com/
/mor/fork ) - Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request