doc_validator 1.2.4 → 1.2.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 283b38317f7ed58f71f03e5c20e92ee3db7945046e896e7c76bc812ff9be06a8
4
- data.tar.gz: 6db7ac0497d7d669edf54da5cd0f9b1797c9c3550d73a09528399db695525768
3
+ metadata.gz: 00630e4c82c7cc29f4681fb3e379717fc17039e02328bd6f49b8a5b21aacc70f
4
+ data.tar.gz: 3a29a7c36dc0ded72966bfa6c8294c10be7588c8a5f9a7de897b24a30b0196b4
5
5
  SHA512:
6
- metadata.gz: 2a7359e5a927581e028193504fbda2c45c0eff4bb3746ca4fa3919a9f93918002269e0d2ea98f9a7786d504a03ae29db1fe4b8725d9eb9401c21dc8668a2a356
7
- data.tar.gz: ce2827a99ba4f8a4d235e5f953e7c116df43d888a08f36c8db8f403aca43525e8a4b25fe985a15250f64d7468fd94fc75f622313d95e9e8b1419abeb0f710261
6
+ metadata.gz: bec6ffda79e157eaa2eb3165e88599c6ace39989c88ddce1742ca92292f492144a94b31573963ec2a04516230a6983fbd1b88fb42942cb11fe1759ff6a132d3c
7
+ data.tar.gz: 68e020b8194848cd32fc53a0c865533af46bd3c334608f1e43feaa5bb60d0c33f2fde7bd51c2a6e986bbddad76ba8efbff7d71450605ee63b2ace3ce2dbe386e
data/README.md CHANGED
@@ -40,6 +40,12 @@ Para formatar um CPF, use o método `.format`:
40
40
  DocValidator::Cpf.format("12345678909") # Retorna "123.456.789-09"
41
41
  ```
42
42
 
43
+ Para máscara um CNPJ, use o método `.mask`:
44
+
45
+ ```ruby
46
+ DocValidator::Cnpj.mask("12345678909") # Retorna "***.456.789-**"
47
+ ```
48
+
43
49
  ### Validação de CNPJ
44
50
 
45
51
  Para validar um CNPJ, use o método `.valid?`:
@@ -55,19 +61,31 @@ Para formatar um CNPJ, use o método `.format`:
55
61
  DocValidator::Cnpj.format("12345678000195") # Retorna "12.345.678/0001-95"
56
62
  ```
57
63
 
64
+ Para máscara um CNPJ, use o método `.mask`:
65
+
66
+ ```ruby
67
+ DocValidator::Cnpj.mask("12345678000195") # Retorna "**.*345.678/0001-**"
68
+ ```
69
+
58
70
  ### Validação de RG
59
71
 
60
72
  Para validar um RG, use o método `.valid?`:
61
73
 
62
74
  ```ruby
63
- DocValidator::Rg.valid?("12.345.678/0001-95") # Retorna true
75
+ DocValidator::Rg.valid?("12.345.678-9") # Retorna true
64
76
  DocValidator::Rg.valid?("11.234.567/0001-000") # Retorna false
65
77
  ```
66
78
 
67
79
  Para formatar um RG, use o método `.format`:
68
80
 
69
81
  ```ruby
70
- DocValidator::Rg.format("12345678000195") # Retorna "12.345.678/0001-95"
82
+ DocValidator::Rg.format("123456789") # Retorna "12.345.678-9"
83
+ ```
84
+
85
+ Para máscara um RG, use o método `.mask`:
86
+
87
+ ```ruby
88
+ DocValidator::Rg.mask("123456789") # Retorna "***.345.678-*"
71
89
  ```
72
90
 
73
91
  ### Validação de CNH
@@ -1,3 +1,3 @@
1
1
  module DocValidator
2
- VERSION = "1.2.4"
2
+ VERSION = "1.2.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doc_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maikon Douglas
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0'
128
128
  requirements: []
129
- rubygems_version: 3.6.5
129
+ rubygems_version: 3.6.2
130
130
  specification_version: 4
131
131
  summary: Uma gem para validação e formatação de documentos
132
132
  test_files: []