Operandi

Operandi is a simple yet powerful way to organize business logic in Ruby applications. Build services that are easy to test, maintain, and understand.

Get started with Quickstart

Features

  • Simple: Define your service as a class with arguments, steps, and outputs

  • 📦 No runtime dependencies: Works stand-alone without requiring external gems at runtime

  • 🔄 Transactions: Automatically rollback database changes if any step fails

  • 🧬 Inheritance: Inherit from other services to reuse logic seamlessly

  • ⚠️ Error Handling: Collect errors from steps and handle them your way

  • 🔗 Context: Run multiple services sequentially within the same context

  • 🧪 RSpec Matchers: Built-in RSpec matchers for expressive service tests

  • 🔍 RuboCop Integration: Custom cops to enforce best practices at lint time

  • 🌐 Framework Agnostic: Compatible with Rails, Hanami, or any Ruby framework

  • 🧩 Modularity: Isolate and test your services with ease

  • 🔷 Sorbet & Tapioca: Full support for Sorbet type checking and Tapioca DSL generation

  • 100% Test Coverage: Thoroughly tested and reliable

  • ⚔️ Battle-Tested: In production use since 2017

Simple Example

Advanced Example (with Sorbet types and conditions)

Get started with Operandi

Last updated