codice-fiscale 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- require 'codice_fiscale/version'
8
- require 'codice_fiscale/configuration'
9
- require 'codice_fiscale/helpers'
10
- require 'codice_fiscale/codes'
11
- require 'codice_fiscale/alphabet'
12
- require 'codice_fiscale/italian_citizen'
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?
@@ -39,9 +39,4 @@ module CodiceFiscale
39
39
  Configurable.config
40
40
  end
41
41
  end
42
-
43
-
44
- def self.config
45
- @config ||= Configuration.new
46
- end
47
42
  end
@@ -1,3 +1,3 @@
1
1
  module CodiceFiscale
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codice-fiscale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: