README.md in sinclair-1.4.0 vs README.md in sinclair-1.4.1
- 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.4.0
+https://www.rubydoc.info/gems/sinclair/1.4.1
Installation
---------------
- Install it
@@ -306,22 +306,22 @@
Configurable is a module that, when used, can add configurations
to your classes/modules.
Configurations are read-only objects that can only be set using
-the `configurable#configure` method
+the `configurable#configure` method which accepts a block or
+hash
```ruby
module MyConfigurable
extend Sinclair::Configurable
# port is defaulted to 80
configurable_with :host, port: 80
end
- MyConfigurable.configure do |config|
+ MyConfigurable.configure(port: 5555) do |config|
config.host 'interstella.art'
- config.port 5555
end
MyConfigurable.config.host # returns 'interstella.art'
MyConfigurable.config.port # returns 5555