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: helper.rb
    path of file: ./repos/surrealist/lib/surrealist
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Surrealist
  # A generic helper.
  module Helper
    # Determines
    
    def self.collection?(object)
      # 4.2 AR relation object did not include Enumerable (it defined
      # all necessary method through ActiveRecord::Delegation module),
      # so we need to explicitly check for this
      return false if object.is_a?(Struct)

      object.is_a?(Enumerable) && !object.instance_of?(Hash) || ar_relation?(object)
    end