Skip to content

Instantly share code, notes, and snippets.

@Hasstrup
Created November 5, 2024 20:01
Show Gist options
  • Select an option

  • Save Hasstrup/9b7d59f3478722245d1eb97c53d85ad8 to your computer and use it in GitHub Desktop.

Select an option

Save Hasstrup/9b7d59f3478722245d1eb97c53d85ad8 to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
# The Fetch class is responsible for retrieving user records from the database.
# It extends the BaseService and includes the Queries::Engine module to leverage
# query execution functionality.
class Users::Contexts::Fetch < BaseService
include Queries::Engine
private
# Returns the class of the model to be queried.
#
# @return [Class] The model class for users.
def klass
::User
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment