hash_attribute_assignment 0.0.2 → 0.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: 570a876c66326d3a7d47bfc3072cc472f3504c57
4
- data.tar.gz: 3b09441cc145bae394f9fb1896420f37e8365a58
3
+ metadata.gz: fef78ba634ed9ffefa2b658199e4ca30c8a4ce99
4
+ data.tar.gz: d07592280f4d839e688e9e84531cd7142216b1af
5
5
  SHA512:
6
- metadata.gz: ce3fd001e14b42e6937d2118607aa5d5df3e4cd1881b6285d769aa21313840bc3a952507591876bad4835215d1b252290fd8b0a3ddf3be71fe1085edc491a84f
7
- data.tar.gz: 62a33ac99364def80cb440b6bbec95941ff9074c82b235ba2d51ac0c5521cb2b8d54782bfbf200a980ff5b8735df619615b356c53c4707bad571c160714569e2
6
+ metadata.gz: 38dc8c5f682f02c934a7be2e597f837db8759aa47afc9cd7d4fda07441e531f2d621a8d1f94b1078ab35e642617e485401891aa5ffa682963a7d7794b6743254
7
+ data.tar.gz: aeddaf7c9d9a321ca32e4404ed01d5e94a28a99db0df4abe5fdab867ab92a5f769a0605dc8e5079d3b6bc747cf2ecf5e285677371e1a2721dee27efd9baf2859
@@ -13,7 +13,6 @@ module HashAttributeAssignment
13
13
  class_variable_defined?(:@@hash_validations) ? class_variable_get(:@@hash_validations) : []
14
14
  end
15
15
  end
16
- class HashValidationError < StandardError; end
17
16
  class HashAttributeAssignor
18
17
  def initialize(instance, hash = {})
19
18
  @hash = hash
@@ -52,7 +51,7 @@ module HashAttributeAssignment
52
51
 
53
52
  def validate_hash!
54
53
  hash_validations.each do |validation|
55
- raise HashValidationError, validation.message unless validation.proc.call hash
54
+ raise ArgumentError, validation.message unless validation.proc.call hash
56
55
  end
57
56
  end
58
57
 
@@ -1,3 +1,3 @@
1
1
  module HashAttributeAssignment
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_attribute_assignment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Alexander