Использование двойных двоеточий создает метод класса.Вы можете увидеть это, выполнив простой тест:
class A
def A::f
puts "Called A::f"
end
end
puts "A.public_methods:"
puts A.public_methods(false)
puts
a = A.new
puts "a.public_methods:"
puts a.public_methods(false)
puts
puts "Attempt to call f"
A.f
a.f
Вывод:
A.public_methods:
f
allocate
new
superclass
a.public_methods:
Attempt to call f
Called A::f
NoMethodError: undefined method ‘f’ for #<A:0x0000010084f020>