README.md in codice-fiscale-0.0.4 vs README.md in codice-fiscale-0.0.5
- old
+ new
@@ -9,22 +9,23 @@
## Usage
```ruby
require 'codice_fiscale'
- CodiceFiscale.calculate 'mario', 'rossi', :male, Date.new(1987, 1, 1), 'italia', 'lc', 'Abbadia Lariana'
+ CodiceFiscale.calculate :name => 'Mario', :surname => 'Rossi', :gender => :male, :birthdate => Date.new(1987, 1, 1), :province_code => 'LC', :city_name => 'Abbadia Lariana'
# RSSMRA87A01A005V
```
## City codes (Codici catastali)
As explained above, one of the information required to calculate the fiscal code is the birthplace.
If a person was born outside Italy, only the italian name of the county is required.
For example, an italian citizen born in France:
```ruby
- CodiceFiscale.calculate 'mario', 'rossi', :male, Date.new(1987, 1, 1), 'francia'
+ CodiceFiscale.calculate :name => 'Mario', :surname => 'Rossi', :gender => :male, :birthdate => Date.new(1987, 1, 1), :country_name => 'Francia'
```
+
If a person was born in Italy you have to specify the *code* of the province and the *name* of the city. These informations are actually contained in an XLS
document downloaded from [agenziaterritorio.it](http://www.agenziaterritorio.it/?id=721), converted to CSV and shipped with this gem.
**But what if you have your own table with all those codes?**