- Rename
Operation::New
to:Instantiate
to avoid name clashes withNew
operations in applications. - Fix Ruby > 2.3.3's
Forwardable
issue.
-
Allow passing tmp options into
KW::Option
that will be merged withoptions
and then transformed into kw args, but only locally for the step scope (or wherever you doOption.()
). The API:Option::KW.(proc).(input, options, some: "more", ...)
Note that
KW::Option
could be massively sped up with simple optimizations.
- Use
Forwardable
instead ofUber::Delegates
.
Flow
is nowRailway
.- Any
Right
subclass will now be interpreted as success. - Add
fail!
,fail_fast!
,pass!
, andpass_fast!
. - The only semi-public method to modify the pipe is
Railway#add
- Removed
&
,>
,<
and%
"operators" in favor of#add
. - Extremely simplified the macro API. Macros now return a callable step with the interface
->(input, options)
and their pipe options, e.g.[ step, name: "my.macro"]
.
Removing Operation::consider
, which is now step
.
We now have three methods, only.
step
import macro or add step with the & operator, meaning its result is always evaluated and decides about left or right.success
always adds to right track.failure
always adds to left track.
This was heavily inspired by a discussion with @dnd, so, thanks! 🍻
-
Introduce a new keyword signature for steps:
step ->(options, params:, **) { options["x"] = params[:id] }
The same API works for instance methods and
Callable
s.Note that the implementation of
Option
andSkills#to_hash
are improveable, but work just fine for now.
- Simplify inheritance by basically removing it.
- Improvements with the pipe DSL.
_insert
provides better API now.
- Don't pass the operation into
Result
, but theSkill
options hash, only.
- Add
#inspect(slices)
.
- Works.