Created
February 13, 2011 20:01
-
-
Save jacegu/825047 to your computer and use it in GitHub Desktop.
An example of declaring visibility of existing methods in Ruby.
This file contains hidden or 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 EvenMoreAccessControlExamples | |
def public_by_default | |
end | |
def protected_method | |
end | |
def this_is_public_too | |
end | |
def private_method | |
end | |
protected :protected_method | |
public :public_by_default, :this_is_public_too | |
private :private_method | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment