README.md in lotus-validations-0.2.2 vs README.md in lotus-validations-0.2.3

- old
+ new

@@ -469,16 +469,39 @@ # #<Lotus::Validations::Error:0x007fe00cee30d8 @attribute=:age, @validation=:size, @expected=18..99, @actual=17> # ] # }> ``` +### Lotus::Entity + +Integration with [`Lotus::Entity`](https://github.com/lotus/model) is activated automatically. + +```ruby +require 'lotus/model' +require 'lotus/validations' + +class Product + include Lotus::Entity + include Lotus::Validations + + attribute :name, type: String, presence: true + attribute :price, type: Integer, presence: true +end + +product = Product.new(name: 'Book', price: '100') +product.valid? # => true + +product.name # => "Book" +product.price # => 100 +``` + ## Contributing 1. Fork it ( https://github.com/lotus/lotus-validations/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request ## Copyright -Copyright 2014 Luca Guidi – Released under MIT License +Copyright 2014-2015 Luca Guidi – Released under MIT License