Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elcuervo/shoden-contrib
https://github.com/elcuervo/shoden-contrib
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/elcuervo/shoden-contrib
- Owner: elcuervo
- License: mit
- Created: 2014-10-28T23:02:16.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-29T20:30:38.000Z (about 10 years ago)
- Last Synced: 2024-11-28T23:28:29.896Z (about 1 month ago)
- Language: Ruby
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shoden Contrib - [![Gem Version](https://badge.fury.io/rb/shoden-contrib.svg)](http://badge.fury.io/rb/shoden-contrib)
![](http://www.lashwallpapers.com/wp-content/uploads/2014/05/elephant-wallpaper-in-hd-free-download.jpg)
shoden-contrib adds some sugar to play with Shoden
## Installation
```bash
gem install shoden-contrib
```## Data Types
```ruby
class Person < Shoden::Model
include Shoden::DataTypesattribute :age, Type::Integer
end
```## Default
```ruby
class Person < Shoden::Model
include Shoden::Defaultattribute :name
default :name, 'John Doe'
end
```## Timestamps
```ruby
class Person < Shoden::Model
include Shoden::Timestamps
endperson = Person.create
person.created_at
person.updated_at
```