README.md in sinclair-1.3.4 vs README.md in sinclair-1.4.0
- old
+ new
@@ -12,11 +12,11 @@
that enables creation of methods on the fly through class
methods
Yard Documentation
-------------------
-https://www.rubydoc.info/gems/sinclair/1.3.4
+https://www.rubydoc.info/gems/sinclair/1.4.0
Installation
---------------
- Install it
@@ -333,11 +333,13 @@
```
Configurations can also be done through custom classes
```ruby
- class MyServerConfig
+ class MyServerConfig < Sinclair::Config
+ config_attributes :host, :port
+
def url
if @port
"http://#{@host}:#{@port}"
else
"http://#{@host}"
@@ -346,10 +348,10 @@
end
class Client
extend Sinclair::Configurable
- configurable_by MyServerConfig, with: %i[host port]
+ configurable_by MyServerConfig
end
Client.configure do
host 'interstella.com'
end