README.md in sinclair-1.6.1 vs README.md in sinclair-1.6.2
- old
+ new
@@ -13,11 +13,11 @@
that enables creation of methods on the fly through class
methods
Yard Documentation
-------------------
-[https://www.rubydoc.info/gems/sinclair/1.6.1](https://www.rubydoc.info/gems/sinclair/1.6.1)
+[https://www.rubydoc.info/gems/sinclair/1.6.2](https://www.rubydoc.info/gems/sinclair/1.6.2)
Installation
---------------
- Install it
@@ -444,10 +444,29 @@
ENV['SERVICE_HOSTNAME'] = 'host.com'
ServiceClient.default # returns #<ServiceClient:0x0000556fa1b366e8 @username="my-login", @password=nil, @port=80, @hostname="host.com">'
```
+### Sinclair::Options
+Options allows projects to have an easy to configure option object
+
+```ruby
+ class ConnectionOptions < Sinclair::Options
+ with_options :timeout, :retries, port: 443, protocol: 'https'
+ end
+
+ options = ConnectionOptions.new(
+ timeout: 10,
+ protocol: 'http'
+ )
+
+ options.timeout # returns 10
+ options.retries # returns nil
+ options.protocol # returns 'http'
+ options.port # returns 443
+```
+
RSspec matcher
---------------
You can use the provided matcher to check that your builder is adding a method correctly
@@ -527,5 +546,6 @@
Projects Using
---------------
- [Arstotzka](https://github.com/darthjee/arstotzka)
+- [Azeroth](https://github.com/darthjee/azeroth)