Permalink
Browse files

Update README.md

  • Loading branch information...
dkubb committed Nov 25, 2012
1 parent 692bcc3 commit 2f35a822defa9a38c7ed1b05e890f3f49447ca8b
Showing with 19 additions and 10 deletions.
  1. +19 −10 README.md
View
@@ -11,12 +11,24 @@ It allows to declare abstract_class classes and modules in an unobstrusive way.
Installation
------------
There is no gem release yet so use git source.
With Rubygems:
In your **Gemfile**
```bash
$ gem install abstract_class
$ irb -rubygems
>> require 'abstract_class'
=> true
```
``` ruby
gem 'abstract_class', :git => 'https://github.com/dkubb/abstract_class'
With git and local working copy:
```bash
$ git clone git://github.com/dkubb/abstract_class.git
$ cd abstract_class
$ rake install
$ irb -rubygems
>> require 'abstract_class'
=> true
```
Examples
@@ -33,14 +45,14 @@ class Foo
abstract_singleton_method :singleton_method
end
Foo.new # raises NotImplementedError: Foo is an abstract class
Foo.singleton_method # raises NotImplementedError: Foo.bar is not implemented
Foo.new # raises NotImplementedError: Foo is an abstract class
Foo.singleton_method # raises NotImplementedError: Foo.bar is not implemented
# Subclassing to allow instancitation
class Baz < Foo; end
object = Baz.new
object.bar # raises NotImplementedError: Baz#bar is not implemented
object.bar # raises NotImplementedError: Baz#bar is not implemented
```
@@ -53,9 +65,6 @@ Credits
Contributing
-------------
Contributing
-------------
* If you want your code merged into the mainline, please discuss the proposed changes with me before doing any work on it. This library is still in early development, and the direction it is going may not always be clear. Some features may not be appropriate yet, may need to be deferred until later when the foundation for them is laid, or may be more applicable in a plugin.
* Fork the project.
* Make your feature addition or bug fix.

0 comments on commit 2f35a82

Please sign in to comment.