Permalink
Browse files

mv to markdown marckup

[ci skip]
  • Loading branch information...
bbcoimbra committed Oct 15, 2011
1 parent 874d897 commit 521761a698e77b9b3208ecdf1de9370defad08c8
Showing with 47 additions and 44 deletions.
  1. +47 −0 README.markdown
  2. +0 −44 README.rdoc
View
@@ -0,0 +1,47 @@
+# br-cnpj ![travis-ci build status](https://secure.travis-ci.org/bbcoimbra/br-cnpj.png?branch=master)
+
+Ruby native extension that calculates and validades CNPJ (Cadastro Nacional de
+Pessoas Jurídicas)
+
+## Install
+
+```bash
+sudo gem install br-cnpj
+```
+
+## Examples
+
+```ruby
+require 'rubygems'
+require 'br/cnpj'
+
+BR::CNPJ.valid? '00000000000191'
+ #> true
+
+BR::CNPJ.valid? 191
+ #> true
+
+BR::CNPJ.valid? 192
+ #> false
+
+radix = 0
+filial = 1
+BR::CNPJ.new(radix, filial).to_s
+ #> '00000000000191'
+
+BR::CNPJ.new(191).valid?
+ #> true
+
+BR::CNPJ.new(1234567891011).valid?
+ #> false
+
+BR::CNPJ.format(191)
+ #> '00.000.000/0001-91'
+
+BR::CNPJ.unformat('00.000.000/0001-91')
+ #> '00000000000191'
+```
+
+## Copyright
+
+Copyright (c) 2010 Bruno Coimbra. Veja o arquivo LICENSE para mais detalhes.
View
@@ -1,44 +0,0 @@
-= br-cnpj
-
-Ruby native extension that calculates and validades CNPJ (Cadastro Nacional de
-Pessoas Jurídicas)
-
-== Install
-
- sudo gem install br-cnpj
-
-== Examples
-
- require 'rubygems'
- require 'br/cnpj'
-
- BR::CNPJ.valid? '00000000000191'
- => true
-
- BR::CNPJ.valid? 191
- => true
-
- BR::CNPJ.valid? 192
- => false
-
- radix = 0
- filial = 1
- BR::CNPJ.new(radix, filial).to_s
- => '00000000000191'
-
- BR::CNPJ.new(191).valid?
- => true
-
- BR::CNPJ.new(1234567891011).valid?
- => false
-
- BR::CNPJ.format(191)
- => '00.000.000/0001-91'
-
- BR::CNPJ.unformat('00.000.000/0001-91')
- => '00000000000191'
-
-
-== Copyright
-
-Copyright (c) 2010 Bruno Coimbra. Veja o arquivo LICENSE para mais detalhes.

0 comments on commit 521761a

Please sign in to comment.