README.md in sinclair-1.8.0 vs README.md in sinclair-1.9.0
- old
+ new
@@ -11,13 +11,15 @@
This gem helps the creation of complex gems/concerns
that enables creation of methods on the fly through class
methods
+Next release: [1.10.0](https://github.com/darthjee/sinclair/compare/1.9.0...master)
+
Yard Documentation
-------------------
-[https://www.rubydoc.info/gems/sinclair/1.8.0](https://www.rubydoc.info/gems/sinclair/1.8.0)
+[https://www.rubydoc.info/gems/sinclair/1.9.0](https://www.rubydoc.info/gems/sinclair/1.9.0)
Installation
---------------
- Install it
@@ -471,9 +473,31 @@
options.retries # returns nil
options.protocol # returns 'http'
options.port # returns 443
ConnectionOptions.new(invalid: 10) # raises Sinclair::Exception::InvalidOptions
+```
+
+### Sinclair::Comparable
+Comparable allows a class to implement quickly a `==` method comparing given attributes
+
+```ruby
+ class SampleModel
+ include Sinclair::Comparable
+
+ comparable_by :name
+ attr_reader :name, :age
+
+ def initialize(name: nil, age: nil)
+ @name = name
+ @age = age
+ end
+ end
+
+ model1 = model_class.new(name: 'jack', age: 21)
+ model2 = model_class.new(name: 'jack', age: 23)
+
+ model1 == model2 # returns true
```
RSspec matcher
---------------