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: list.rb
    path of file: ./repos/artichoke/artichoke-backend/vendor/ruby/lib/bundler/cli
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Bundler
  class CLI::List
    def initialize(options)
      @option
    
    def filtered_specs_by_groups
      definition = Bundler.definition
      groups = definition.groups

      verify_group_exists(groups)

      show_groups =
        if @without_group.any?
          groups.reject {|g| @without_group.include?(g) }
        elsif @only_group.any?
          groups.select {|g| @only_group.include?(g) }
        else
          groups
        end.map(&:to_sym)

      definition.specs_for(show_groups)
    end