    # File lib/amalgalite/database.rb, line 450
        def profile_tap=( tap_obj )

          # unregister any previous profile tap
          unless @profile_tap.nil?
            @profile_tap.profile( 'unregistered as profile tap', 0.0 )
            @profile_tap = nil
          end
          return @profile_tap if tap_obj.nil?

          if tap_obj.respond_to?( 'profile' ) then
            @profile_tap = tap_obj
          else
            raise Amalgalite::Error, "#{tap_obj.class.name} cannot be used to tap.  It has no 'profile' method"
          end
          @api.register_profile_tap( @profile_tap )
          @profile_tap.profile( 'registered as profile tap', 0.0 )
        end