RubyGems Navigation menu

interactor-contracts 0.3.0

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.

Gemfile:
= 複製 已複製

安裝:
=

版本列表:

  1. 0.3.0 - October 10, 2019 (15.0 KB)
  2. 0.2.0 - May 28, 2019 (12.5 KB)
  3. 0.1.0 - February 25, 2017 (12.5 KB)

Runtime 相依性套件 (2):

Development 相依性套件 (1):

bundler > 1.11

擁有者:

Pushed by:

作者:

  • Michael Herold

SHA 256 checksum:

7137aaa6e93eafc730f444a91774efdca522699469593fecd0b6d93ba8b45ee6

總下載次數 528,715

這個版本 384,872

License:

MIT

Ruby 版本需求: >= 0

相關連結: