Skip to content

Instantly share code, notes, and snippets.

@marcinjak
Last active Jun 22, 2018
Embed
What would you like to do?
class UserCreateService
def initialize(validator: UserValidator.new)
@validator = validator
end
def call(params)
return false unless validator.validate(params)
process_user_data
end
attr_reader :validator
def process_user_data
...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment