Created
August 24, 2009 13:41
-
-
Save raldred/173889 to your computer and use it in GitHub Desktop.
How to define private class methods in ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
class << self | |
private | |
def bar | |
end | |
end | |
end | |
class Foo | |
def self.bar | |
end | |
private_class_method :bar | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment