private_class_method を使う。
class Foo
def self.method
3
end
private_class_method :method
end
pry 2.1.1-p76> Foo.method
NoMethodError: private method `method' called for Foo:Class
または、特異クラスでプライベートなメソッドを定義。
class Bar
class <<self
private
def method
3
end
end
end