Comment Comment by ismaelct Thanks Mitchell (big fan, btw!).Indeed!https://github.com/hashicorp/vagrant/blob/main/lib/vagrant/a...Yes, it's not a new pattern by any means, and there's many ways to "halt" the pipeline as you say. For example ActiveRecord stops callback chains if any callback throws ":halt".Other examples are Redis.rb's pipelining API https://github.com/redis/redis-rb?tab=readme-ov-file#pipelin...Or more generally any builder-style pattern that composes a set of operations for later execution, including again ActiveRecord's query chaining.In my article I tried to show a specific implementation using the Railway pattern (where the result must only respond to "#continue?() => Boolean") parent ismaelct 2 years ago
Indeed!https://github.com/hashicorp/vagrant/blob/main/lib/vagrant/a...
Yes, it's not a new pattern by any means, and there's many ways to "halt" the pipeline as you say. For example ActiveRecord stops callback chains if any callback throws ":halt".
Other examples are Redis.rb's pipelining API https://github.com/redis/redis-rb?tab=readme-ov-file#pipelin...
Or more generally any builder-style pattern that composes a set of operations for later execution, including again ActiveRecord's query chaining.
In my article I tried to show a specific implementation using the Railway pattern (where the result must only respond to "#continue?() => Boolean")