RAA - access

access / 0.1

Short description: Eiffel-esque access modifiers
Category: Library/Language
Status: experimental
Created: 2003-11-21 21:00:03 GMT
Last update: -
Owner: Jamis Buck (Projects of this owner)
Homepage: http://ruby.jamisbuck.org
Download: http://ruby.jamisbuck.org/access+-0.1.tar.gz
License: GPL
Dependency:
None
Description:

An implementation of Eiffel-esque access modifiers for methods. Use the 'feature' or 'allow' methods (they do the same thing) to specify an optional list of classes that may access the subsequently-declared methods. This provides, then, a superset of Ruby's default access modifiers (private, protected, and public).

Get private access by specifying the :None symbol as the parameter to 'feature' or 'allow'. (This actually differs from Ruby's 'private' access in that not even a Class's desendents may access the method.)

Get protected access by specifying the declaring class as the parameter to 'feature' or 'allow'.

Get public access by specifying :Any or :Object as the parameter to 'feature' or 'allow'.

Plus, you can get 'friend' access by specifying the name of all of the classes that you want to be able to access those methods.

This provides a much more powerful way to restrict and grant access to the methods (or 'features', as Eiffel would say) of a class.

Edit this project (for project owner)

back to RAA top