README.md in memory_model-0.1.0 vs README.md in memory_model-1.0.0
- old
+ new
@@ -1,15 +1,14 @@
-[](http://allthebadges.io/jwaldrip/memory_model/badge_fury)
-[](http://allthebadges.io/jwaldrip/memory_model/gemnasium)
-[](http://allthebadges.io/jwaldrip/memory_model/travis)
-[](http://allthebadges.io/jwaldrip/memory_model/coveralls)
-[](http://allthebadges.io/jwaldrip/memory_model/code_climate)
-
# MemoryModel
-TODO: Write a gem description
+[](https://badge.fury.io/rb/jsonapionify)
+[](https://travis-ci.org/brandfolder/jsonapionify)
+[](https://codeclimate.com/github/jwaldrip/memory_model)
+[](https://codeclimate.com/github/jwaldrip/memory_model/coverage)
+An in memory model construct. Good for testing.
+
## Installation
Add this line to your application's Gemfile:
gem 'memory_model'
@@ -22,10 +21,47 @@
$ gem install memory_model
## Usage
-TODO: Write usage instructions here
+### Creating a basic model
+
+```ruby
+class User < MemoryModel::Base
+ primary_key :id
+
+ field :first_name
+ field :last_name
+end
+```
+
+### Creating Records
+
+```ruby
+User.create(first_name: 'jason')
+
+# OR
+
+User.new(first_name: 'jason').save
+```
+
+### Finding Records
+
+```ruby
+User.find(id)
+```
+
+### Updating Records
+
+```ruby
+User.find(id).update(first_name: 'larry')
+```
+
+### Deleting Records
+
+```ruby
+User.find(id).delete
+```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)