# File lib/rubygems/commands/query_command.rb, line 24
      def execute
        if local?
          say
          say "*** LOCAL GEMS ***"
          output_query_results(Gem::cache.search(options[:name]))
        end
        if remote?
          say
          say "*** REMOTE GEMS ***"
          output_query_results(Gem::SourceInfoCache.search(options[:name]))
        end
      end