codice-fiscale 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/codice_fiscale.rb +10 -7
- data/lib/codice_fiscale/configuration.rb +0 -5
- data/lib/codice_fiscale/version.rb +1 -1
- metadata +1 -1
data/lib/codice_fiscale.rb
CHANGED
@@ -4,15 +4,18 @@ require 'csv'
|
|
4
4
|
require 'active_model'
|
5
5
|
require 'active_support/core_ext/object/blank'
|
6
6
|
require 'active_support/core_ext/module/delegation'
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
require
|
11
|
-
|
12
|
-
|
13
|
-
require 'codice_fiscale/fiscal_code'
|
7
|
+
|
8
|
+
|
9
|
+
%w[version configuration helpers alphabet codes italian_citizen fiscal_code].each do |filename|
|
10
|
+
require "codice_fiscale/#{filename}"
|
11
|
+
end
|
12
|
+
|
14
13
|
|
15
14
|
module CodiceFiscale
|
15
|
+
def self.config
|
16
|
+
@config ||= Configuration.new
|
17
|
+
end
|
18
|
+
|
16
19
|
def self.calculate params
|
17
20
|
citizen = ItalianCitizen.new params
|
18
21
|
raise ArgumentError.new("#{citizen.errors}") unless citizen.valid?
|