https://github.com/trailblazer/trailblazer-operation
Trailblazer's Operation implementation.
https://github.com/trailblazer/trailblazer-operation
Last synced: 7 months ago
JSON representation
Trailblazer's Operation implementation.
- Host: GitHub
- URL: https://github.com/trailblazer/trailblazer-operation
- Owner: trailblazer
- Created: 2016-09-06T20:52:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-27T15:48:37.000Z (7 months ago)
- Last Synced: 2025-03-29T19:04:48.884Z (7 months ago)
- Language: Ruby
- Homepage: https://trailblazer.to/2.1/docs/operation.html
- Size: 796 KB
- Stars: 88
- Watchers: 12
- Forks: 25
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
Awesome Lists containing this project
README
# Trailblazer-operation
_Trailblazer's Operation implementation._
## Overview
An operation is a pattern from the Trailblazer architecture. It implements a public function such as "create user" or "archive blog post". Internally, an operation is simply a generic _activity_ that uses an existing DSL to help you creating the operation's flow.
An operation is identical to an activity with two additions.
* A public `call` method with a simplified signature `Create.call(params: params, current_user: @user)`
* It produces a `Result` object with the popular `success?` API.An operation can be used exaclty like an activity, including nesting, tracing, etc.
## Copyright
Copyright (c) 2016-2020 Nick Sutterer
`trailblazer-operation` is released under the [MIT License](http://www.opensource.org/licenses/MIT).