You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sign_up.rb
    path of file: ./repos/gitlabhq/qa/lib/gitlab/page/main
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Gitlab
  module Page
    module Main
      class SignUp < Chemlab::Page
        path '/users/sign_up'

        text_field :first_name, 'data-testid': 'new-user-first-name-field'
        text_field :last_name, 'data-testid': 'new-user-last-name-field'

        tex
    
        def register_user(user)
          raise ArgumentError, 'User must be of type Resource::User' unless user.is_a? ::QA::Resource::User

          self.first_name = user.first_name
          self.last_name = user.last_name
          self.username = user.username
          self.email = user.email
          self.password = user.password

          self.register
        end