Categories: None [Edit]

interactor-contracts

https://rubygems.org/gems/interactor-contracts
https://github.com/michaelherold/interactor-contracts
Interactors are a pattern for structuring your business logic into units. They have a flexible context that they pass between them, which makes them easy-to-write, but hard-to-understand after you've written them. Much of this confusion comes from not knowing what the interactor is supposed to take as input and what it's expected to produce. Enter contracts. Contracts allow you define, up front, a contract both for the input of an interactor, known as expectations, and the output of it, known as promises. Additionally, you can define a handler for what happens when an interactor violates its contracts, known as a breach. Declaring these contracts can help define your interface and make it easier to understand how to use an interactor. They form both documentation and validation for your business logic.

Total

Ranking: 6,275 of 186,833
Downloads: 766,301

Daily

Ranking: 7,645 of 186,696
Downloads: 157

Depended by

RankDownloadsName
39,62329,153cron_to_go_sync
107,5966,624interactify
115,9315,781prelands_rails

Depends on

RankDownloadsName
12,901,817,099bundler
50388,281,896dry-validation
1,55821,895,307interactor

Owners

#GravatarHandle
1iconmichaeljherold