Gem that provides entities for ruby..
Add this line to your application's Gemfile:
gem 'korsakov'
And then execute:
$ bundle
Or install it yourself as:
$ gem install korsakov
TODO
These objects can be used to simplify your design by making sure your object is always valid.
class User < Korsakov::Entity
attributes :name, :username, :email
end
my_entity = User.new do
self.name = 'jan'
self.username = 'jjoos'
self.email = 'jan@deelstra.org'
end
or
my_entity = User.new({name: 'jan', username: 'jjoos', email: 'jan@deelstra.org'})
my_entity = my_entity.update({name: 'joop', email: 'joop@deelstra.org'})
puts my_entity.username- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Run bundle, before starting development.
- Implement your feature/bugfix and corresponding tests.
- Make sure your tests run against the latest stable mri.
- Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request




