Created
February 13, 2011 19:55
-
-
Save jacegu/825037 to your computer and use it in GitHub Desktop.
A little example for access control declaration 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 AccessControlExamples | |
def public_method_by_default | |
end | |
protected | |
def first_protected_method | |
end | |
def second_protected_method | |
end | |
private | |
def private_method | |
end | |
def another_private_method | |
end | |
public | |
def this_method_is_public_again | |
end | |
def and_this_too | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment