akkounts/app/services/application_service.rb
Râu Cao 179a82d2dd
Use keyword arguments for ApplicationService calls
Not all services are using keywords, which breaks those calls in Ruby 3
2024-02-02 15:50:25 +02:00

8 lines
235 B
Ruby

class ApplicationService
# This enables executing a service's `#call` method directly via
# `MyService.call(args)`, without creating a class instance it first.
def self.call(**args, &block)
new(**args, &block).call
end
end