Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modify README format from RDoc to Markdown

  • Loading branch information...
commit 30cd38d7e096dc6e5fda38e16ce9b189ad13f67f 1 parent 55bfbb4
@kachick authored
Showing with 68 additions and 59 deletions.
  1. +68 −0 README.md
  2. +0 −59 README.rdoc
View
68 README.md
@@ -0,0 +1,68 @@
+flyweight
+=============
+
+[![Build Status](https://secure.travis-ci.org/kachick/flyweight.png)](http://travis-ci.org/kachick/flyweight)
+[![Gem Version](https://badge.fury.io/rb/flyweight.png)](http://badge.fury.io/rb/flyweight)
+
+Description
+-----------
+
+A tiny template for the "Flyweight Pattern".
+
+Features
+--------
+
+* MyClass.intern
+
+Usage
+-----
+
+```ruby
+class Material
+ include Flyweight
+
+ def initialize(looks, price)
+ @looks, @price = looks, price
+ end
+end
+
+a = Material.intern :metal, 2000
+b = Material.intern :metal, 2000
+c = Material.new :metal, 2000
+d = Material.intern :paper, 50
+a == b #=> true
+a.equal? b #=> true
+a == c #=> true
+a.equal? c #=> false
+a == d #=> false
+a.equal? d #=> false
+```
+
+Requirements
+-------------
+
+* [Ruby 1.9.2 or later](http://travis-ci.org/#!/kachick/flyweight)
+
+Install
+-------
+
+```bash
+$ gem install flyweight
+```
+
+Link
+----
+
+* [Home](https://kachick.github.com/flyweight)
+* [code](https://github.com/kachick/flyweight)
+* [API](http://kachick.github.com/flyweight/yard/frames.html)
+* [issues](https://github.com/kachick/flyweight/issues)
+* [CI](http://travis-ci.org/#!/kachick/flyweight)
+* [gem](https://rubygems.org/gems/flyweight)
+
+License
+--------
+
+The MIT X11 License
+Copyright (c) 2012 Kenichi Kamiya
+See MIT-LICENSE for further details.
View
59 README.rdoc
@@ -1,59 +0,0 @@
-= Flyweight
-
-{<img src="https://secure.travis-ci.org/kachick/flyweight.png" />}[http://travis-ci.org/kachick/flyweight]
-
-== Description
-
-A tiny template for the "Flyweight Pattern".
-
-== Usage
-
-* Setup
-
- require 'flyweight'
-
-* Overview
-
- class Material
- include Flyweight
-
- def initialize(looks, price)
- @looks, @price = looks, price
- end
- end
-
- a = Material.intern :metal, 2000
- b = Material.intern :metal, 2000
- c = Material.new :metal, 2000
- d = Material.intern :paper, 50
- a == b #=> true
- a.equal? b #=> true
- a == c #=> true
- a.equal? c #=> false
- a == d #=> false
- a.equal? d #=> false
-
-== Requirements
-
-* Ruby 1.9.2 or later
-
-== Installation
-
- gem install flyweight
-
-== Links
-
-code :: https://github.com/kachick/flyweight
-issues :: https://github.com/kachick/flyweight/issues
-CI :: http://travis-ci.org/#!/kachick/flyweight
-gem :: https://rubygems.org/gems/flyweight
-gem+ :: http://metagem.info/gems/flyweight
-
-== License
-
-The MIT X License
-
-Copyright (c) 2012 Kenichi Kamiya
-
-See MIT-LICENSE for further details.
-
Please sign in to comment.
Something went wrong with that request. Please try again.