README.md in sinclair-1.14.2 vs README.md in sinclair-1.15.0

- old
+ new

@@ -13,17 +13,17 @@ to simplify common tasks, reusability and avoid boilerplate code. Whether you need to class methods to create methods on the fly, create custom comparators, configure your application, create powerfull options, Sinclair has got you covered. Employing Sinclair in your applications helps you streamline your development workflow and enhance your development process through more efficient, cleaner code -Current Release: [1.14.2](https://github.com/darthjee/sinclair/tree/1.14.2) +Current Release: [1.15.0](https://github.com/darthjee/sinclair/tree/1.15.0) -[Next release](https://github.com/darthjee/sinclair/compare/1.14.2...master) +[Next release](https://github.com/darthjee/sinclair/compare/1.15.0...master) Yard Documentation ------------------- -[https://www.rubydoc.info/gems/sinclair/1.14.2](https://www.rubydoc.info/gems/sinclair/1.14.2) +[https://www.rubydoc.info/gems/sinclair/1.15.0](https://www.rubydoc.info/gems/sinclair/1.15.0) Installation --------------- - Install it @@ -288,13 +288,13 @@ ```ruby klass = Class.new instance = klass.new -builder = Sinclair.new(klass) -builder.add_method(:random_number) { Random.rand(10..20) } -builder.build +Sinclair.build(klass) do + add_method(:random_number) { Random.rand(10..20) } +end instance.random_number # returns a number between 10 and 20 ``` </details> @@ -324,14 +324,14 @@ # Example with parameters class MyClass end -builder = described_class.new(MyClass) -builder.add_class_method( - :function, 'a ** b + c', parameters: [:a], named_parameters: [:b, { c: 15 }] -) -builder.build +Sinclair.build(MyClass) do + add_class_method( + :function, 'a ** b + c', parameters: [:a], named_parameters: [:b, { c: 15 }] + ) +end MyClass.function(10, b: 2) # returns 115 ``` </details>