smart_init 2.0.2 → 2.0.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
  SHA1:
3
- metadata.gz: 231d6827b8847a42b8e348879e32c2bbf064047c
4
- data.tar.gz: b5fb2b394d6ce49f1a48377dd15e3d0a0f44e9d2
3
+ metadata.gz: 6056d4cf08e55061d4b7cb406fa3d61107d7703e
4
+ data.tar.gz: ff3853b9c773b1115503641aabd4bd93d46f3382
5
5
  SHA512:
6
- metadata.gz: 823d656808f1555613886de78ba6b6b455163ed981ffcaf730fe550b365d9d12d3a50c0bb36a158a9664fe54e5ef0c640471c4e9c677c5934a97cd4bfec88817
7
- data.tar.gz: 679cfee187a6f25dccad66379ed0fe9289f6df84f65c2ad1a7e1d2849f1a0da8fde36ebcb1ad4e67bddd0dc767917f1c7d11267139d090415c6ef932a890aea4
6
+ metadata.gz: fda5e0d95ed0b7282a4ba94ebbcc32ecf61c09e72949424372cd4a355ea92b32da05a27fb5d2a17c272bd9e63240c793e5f5031f97a23e872728fe043c974c73
7
+ data.tar.gz: ce961616f650be88b47a8e4b0fcc074e91e17c469e8a3722ae265fae8929642e30096e9af21d0cecccd0d0f94a1c710fd6333b9ed0fba369aa5a7b070e660b36
@@ -39,14 +39,14 @@ module SmartInit
39
39
 
40
40
  class_eval <<-METHOD
41
41
  def initialize(#{(@@_required_attrs + @@_default_value_attrs.keys).compact.map { |a| @@_default_value_attrs[a] ? "#{a.to_s}: '#{@@_default_value_attrs.fetch(a)}'" : "#{a}:" }.join(', ')})
42
- @@_required_attrs&.each do |attribute|
42
+ @@_required_attrs.each do |attribute|
43
43
  instance_variable_set(
44
44
  "@"+ attribute.to_s,
45
45
  eval(attribute.to_s)
46
46
  )
47
47
  end
48
48
 
49
- @@_default_value_attrs&.keys.each do |attribute|
49
+ @@_default_value_attrs.keys.each do |attribute|
50
50
  instance_variable_set(
51
51
  "@"+ attribute.to_s,
52
52
  eval(attribute.to_s)
@@ -58,7 +58,7 @@ module SmartInit
58
58
  instance_eval do
59
59
  private
60
60
 
61
- attr_reader *(required_attrs + default_value_attrs&.keys)
61
+ attr_reader *(required_attrs + default_value_attrs.keys)
62
62
  end
63
63
  end
64
64
  end
@@ -1,3 +1,3 @@
1
1
  module SmartInit
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_init
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb