README.md in yema-0.0.1 vs README.md in yema-0.0.2
- old
+ new
@@ -17,18 +17,25 @@
$ gem install yema
## Usage
-Standalone:
+Inline:
```ruby
+validator = Yema::Validator.new(params, Yema::Rule::Required.new(:title))
+validator.valid?
+```
+
+Class:
+
+```ruby
class User
include Yema::Validations
attr_accessor :age
end
-User.rules.add(Yema::Rule::StrongType, Integer)
+User.rules.add(Yema::Rule::StrongType.new(:age), Integer)
user = User.new
user.age = 3
user.valid? # => true