Private class methods in RubyEdit
The private, public and protected visibility methods have no effect for class methods:
class Foo
def self.bar
puts "I am public!"
end
private
def self.baz
puts "I am public too!"
end
end
There are two ways to make class methods private:
class Foo
def self.bar
puts "I am private!"
end
private_class_method :bar
end
Or:
class Foo
class << self
private
def bar
puts "I am private!"
end
end
end