Alumna::Ruleable
Constants
ALL_METHODS = ServiceMethod.values.reject(&.options?)
MUTATE_METHODS = WRITE_METHODS + [ServiceMethod::Remove]
READ_METHODS = [ServiceMethod::Find, ServiceMethod::Get]
Explicit method sets - used at boot time only, no runtime cost
WRITE_METHODS = [ServiceMethod::Create, ServiceMethod::Update, ServiceMethod::Patch]
Instance methods
Same on for every rule. Array order is pipeline order. Each rule stays its own step.
after(on : ServiceMethod | Symbol | Array(ServiceMethod | Symbol) | Nil = nil, &block : RuleContext -> ServiceError | Nil)
Sourceafter_commit(rules : Array(Rule), on : ServiceMethod | Symbol | Array(ServiceMethod | Symbol) | Nil = nil)
Same on for every rule. Array order is pipeline order. Each rule stays its own step.
after_commit(on : ServiceMethod | Symbol | Array(ServiceMethod | Symbol) | Nil = nil, &block : RuleContext -> ServiceError | Nil)
Sourcebefore(rules : Array(Rule), on : ServiceMethod | Symbol | Array(ServiceMethod | Symbol) | Nil = nil)
Same on for every rule. Array order is pipeline order. Each rule stays its own step.
before(on : ServiceMethod | Symbol | Array(ServiceMethod | Symbol) | Nil = nil, &block : RuleContext -> ServiceError | Nil)
SourceSame on for every rule. Array order is pipeline order. Each rule stays its own step.
error(on : ServiceMethod | Symbol | Array(ServiceMethod | Symbol) | Nil = nil, &block : RuleContext -> ServiceError | Nil)
Sourcefreeze_rules!
Source