padron 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8754f2ed59f59118b24daaa8b2cb8fcb155aa54c57b8df80d3271b1dfad47112
4
- data.tar.gz: 1a41c5fa4fb2785d011e501c5977f49ed84b28e0de8e7e60b8f58a7c1f7f546c
3
+ metadata.gz: e7eb9ea674b2a3202525144100beca12ae362f2744ccb437d0a5081fe72f3778
4
+ data.tar.gz: ea51d2fb0fe901dc1e9dd8cffe04230518731e404722cf816938a02a1b5f28a2
5
5
  SHA512:
6
- metadata.gz: 2a82bc47f0a2e750bab74dfa0b323062288024f6b8b9719e9d79a0cd8f48b9a63d66301cb097b423c158b1496ed02b8de377fe94ccfa28286ba923c1650f9920
7
- data.tar.gz: 479b61546e0836b7dd0a88f003a10f1e98000c42f8688248a6f1e4107f2921cc51793c3a1658401ad4bd52e6bef933f0732f05521fa917e46c1419e53b2c5ba3
6
+ metadata.gz: faf0f52b87c3f4883108e3820f248cb8d5e262ead4c793a754293dd780eaf97f23ffe4b4103758d90129fae7c386bfac8d850d52ca9050ab25fac89ce1e9dff0
7
+ data.tar.gz: 6deff5034be1d4b481a67a3978523d7594a6c9a139035ae2a48aa872b8c02f550088bf427be41abadc2c1394fb0640c741fc22530f89def1660e3bd7e6e39c05
data/lib/padron/call.rb CHANGED
@@ -67,7 +67,7 @@ module Padron
67
67
  personas.map do |persona|
68
68
  unless persona[:error_constancia] && persona[:error_constancia].try(:[],:apellido).nil?
69
69
  if !persona[:error_constancia].nil?
70
- {:name => persona[:error_constancia][:apellido],
70
+ {:name => set_name(persona[:error_constancia]),
71
71
  :cuit => persona[:error_constancia][:id_persona]}
72
72
  else
73
73
  {:name => set_name(persona[:datos_generales]),
@@ -83,7 +83,7 @@ module Padron
83
83
  end
84
84
 
85
85
  def set_name(persona)
86
- return "#{persona[:nombre]} #{persona[:apellido]}"
86
+ return "#{persona.try(:[], :nombre} #{persona.try(:[], :apellido)}"
87
87
  end
88
88
  end
89
89
  end
@@ -1,3 +1,3 @@
1
1
  module Padron
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Facundo Diaz Martinez