README for abstract_class ========================= See the file MIT-LICENSE for licensing and warranty information. The latest version of this software is available at the following URL: http://svn.dagi3d.net/rails/abstract_class/trunk Description =========== The abstract_class gem allows to create abstract classes and define abstract methods as well. (It's just a proof of concept) Usage ===== * Mark a class as abstract by calling the abstract_class method: #code class Foo abstract_class end #code * Define an abstract method by calling the abstract_method method: #code class Foo abstract_class abstract_method :foo end #code Now the abstract class can't be instantiated: #code foo = Foo.new #raises a Exception #code * Define an inherit class: #code class Bar < Foo def foo end end bar = Bar.new #code Because the Foo class is an abstract class, some points should be taken in account: - The abstract methods can't be implemented in the abstract class - In order to declare abstract methods, the class should be marked as abstract first - The inherited abstract methods have to be implemented About the author ================ Borja Martín