private
or protected
access modifiers which are applied to a singleton method
do not make them private/protected. private_class_method
can be used for that.
class C
private
def self.method
puts 'hi'
end
end
class C
def self.method
puts 'hi'
end
private_class_method :method
end