Rails Generators
Install Generator
Usage
bin/rails generate operandi:installWhat It Creates
class ApplicationService < Operandi::Base # Add common arguments, callbacks, or helpers shared across all services. # # Example: Add a context argument for the current user # arg :current_user, type: User, optional: true, context: true end
Options
Examples
Service Generator
Usage
What It Creates
Options
Examples
Basic Service
Service with Arguments, Steps, and Outputs
Namespaced Service
Custom Parent Class
RSpec Integration
Example Spec File
Best Practices
Next Steps
Last updated