8 lines
		
	
	
		
			235 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			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
 |