Skip to content

Instantly share code, notes, and snippets.

@jacegu
Created February 13, 2011 19:55
Show Gist options
  • Save jacegu/825037 to your computer and use it in GitHub Desktop.
Save jacegu/825037 to your computer and use it in GitHub Desktop.
A little example for access control declaration in Ruby
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