- Introduce
Uber::Option
as a replacement forUber::Options::Value
. It is still there, but deprecated. - New API for
Uber::Builder
: You now add builders toUber::Builder::Builders
and simply call that instance while passing in context and args. This allows very simple reusable builders that can be used anywhere. Uber::Options
now usesUber::Option
.- Removing
Uber::Version
as this is done nicely byGem::Version
.
Value#evaluate
is now#call
. This will make it easier to introduce Null objects.- Options passed to
::builds
are now wrapped inUber::Options::Value
which allows specifying builder class methods usingbuilds :builder_method
. Builder::class_builder
now accepts an optional context object which is used toinstance_exec
the builder blocks. This allows to share predefined builder blocks between different classes while resolving the constants in the respective class.
- Add
inheritable_attr :title, clone: false
. Thanks to @katafrakt. - When calling
Option::Value#evaluate
withnil
as context, and theValue
represents a lambda, the block is called it its original context viablock.call
.
- Add proc syntax for builders. This allows using
return
in the block. Thanks to @dutow for implementing this.
- Make it run with Ruby 2.2.
- Don't clone nil, false, true and symbols in
::inheritable_attr
.
- Builders are not inherited to subclasses. This allows instantiating subclasses directly without running builders.
- Add
Uber::Builder
.
- Add
Uber::Delegates
that provides delegation that can be overridden and called withsuper
.
- Add
Uber::Callable
and support for it inOptions::Value
.
- Fix
Version#>=
partially.
- Add
Uber::Version
for simple gem version deciders.
- Fix a bug where
dynamic: true
wouldn't invoke a method but try to run it as a block.
- Add
Options
and `Options::Value´ for abstracting dynamic options.
- Add
::inheritable_attr
.