Module: Logicall::ClassMethods

Defined in:
lib/logicall.rb

Overview

private class methods module

Instance Method Summary collapse

Instance Method Details

#call(args = {}) ⇒ Object

Public: Invoke a Logicall. Use only the class method call.

args - The argument hash used in Logicall::Args object

Examples

SaveUser.call(user: user)

Returns a Logicall::Result with the resulting data



53
54
55
56
57
58
# File 'lib/logicall.rb', line 53

def call(args = {})
  logicall = new
  logicall.call Args.new(args)
  logicall.rollback(args) if logicall.result.failure?
  logicall.result
end