class RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically

def on_block(node)

def on_block(node)
  attributes = factory_attributes(node) || []
  attributes = [attributes] unless attributes.is_a?(Array) # rubocop:disable Style/ArrayCoercion, Lint/RedundantCopDisableDirective
  attributes.each do |attribute|
    next unless offensive_receiver?(attribute.receiver, node)
    next if proc?(attribute) || association?(attribute.first_argument)
    add_offense(attribute) do |corrector|
      autocorrect(corrector, attribute)
    end
  end
end