module MyMod
  def MyMod.extend_object(obj)
    puts "Extending object id #{obj.object_id}, class #{obj.class}"
    super
  end
  # ...
end

x = [1, 2, 3]
x.extend(MyMod)
# Output:
# Extending object id 36491192, type Array

