Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 806 Bytes

DEVELOPMENT.md

File metadata and controls

32 lines (24 loc) · 806 Bytes

Development Guidelines

  • Keep it simple.
  • Favor easy debug-ability over clever solutions.
  • Aim to be a 0-dependency lib (at runtime)

Roadmap

  • Add "Settings"/Dependency injection for Operations and Chains

    MyOp.with(foo: "bar").call("input")
    
    class MyOp
      settings Types::Hash.schema(foo: Types::String)
    
      def call(input)
        input == "input"
        settings.foo == "bar"
      end
    end
    
    MyCain.with(:step1) { { foo: "bar" } }.with(:stepX) { { another: :setting} }.call(params)
    
  • Add a dry-monads mixin to wrap Operations and Chains result/error into a Result Monad (for example see https://dry-rb.org/gems/dry-types/master/extensions/monads/)

    MyOp.call("input").to_monad do
    end
    
  • Check if/how to deal with inheritance

  • ...