Class: Rwc::Core::BaseService

Inherits:
Object
  • Object
show all
Includes:
Concerns::ErrorHandling::Validatable
Defined in:
lib/rwc/core/base_service.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Concerns::ErrorHandling::Validatable

included, #raise_error!, #should_run_checks?

Class Method Details

.call(**kwargs) ⇒ Object

Calls the service with the provided keyword arguments.

Parameters:

  • kwargs (Hash)

    The keyword arguments to be passed to the service.

Returns:

  • (Object)

    The result of the service call.



16
17
18
# File 'lib/rwc/core/base_service.rb', line 16

def self.call(**kwargs)
  new(**kwargs).call
end

Instance Method Details

#callObject

Executes the service logic. Must be implemented in subclasses.

Raises:

  • (NotImplementedError)

    When not implemented in a subclass.



23
24
25
# File 'lib/rwc/core/base_service.rb', line 23

def call
  raise NotImplementedError
end