module ServiceActor::Conditionable
Add checks to your inputs, by calling lambdas with the name of you choice under the “must” key.
Will raise an error if any check returns a truthy value.
Example:
class Pay < Actor input :provider, must: { exist: ->(provider) { PROVIDERS.include?(provider) } } end
Public Class Methods
included(base)
click to toggle source
# File lib/service_actor/conditionable.rb, line 18 def self.included(base) base.prepend(PrependedMethods) end