Make it easier to create user based operations
Create a class based on the Substance::Operation class, with its bespoke process method:
class UserOperation < Substance::Operation
def process(*)
true
end
end
Initialize it with a user and run it with the necessary parameters for the operation:
operation = UserOperation.new(user)
operation.process(params)
result = operation.success?
SubstanceOperation is licensed under the MIT license. See LICENSE for details.