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,302 of 188,742
Downloads: 814,143

Daily

Ranking: 5,436 of 188,718
Downloads: 563

Depended by

RankDownloadsName
38,51931,826cron_to_go_sync
104,3847,487interactify
113,1216,397prelands_rails

Depends on

RankDownloadsName
13,117,000,961bundler
47498,552,661dry-validation
1,55323,347,094interactor

Owners

#GravatarHandle
1iconmichaeljherold