hash_attribute_assignment 0.0.4 → 0.0.5

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: 8df2530df0431e6380becd5ed7810f55bda63aa8
4
- data.tar.gz: 224ea3a4a3c943409f4fbd284ee1406ac927de25
3
+ metadata.gz: 8920058fbb6e4ccdb57244d95e8a162dc9aec6fd
4
+ data.tar.gz: 89b37e57ed9f4ef74b87d24503e44d04280ae519
5
5
  SHA512:
6
- metadata.gz: 60ba4f88016342079ebaad3063b5bf6d50b148b568037805484c9c635baa29e9deb77558eac8b4832b43e63562a4ba6fe408c584677479e831e7c99eb555ebf6
7
- data.tar.gz: d69b9206e4ff782c4ce0e4b48ca5a98ddabefb87822594e815eb861a7f538098b4e52165a7b259edc2031a95e73e94c2a3037f9b6cf89fb47ef7613823466b08
6
+ metadata.gz: 1346a6b793259b6f8a6a19812fde7a90f0bc07fbfd08983a53f79ecc41765c9584d64ba031518f0a88f8a781a8799d61299a211b547a8ae648f9b7741613ba23
7
+ data.tar.gz: af6e74226e703014c1abf12791e3fa3c0dbb7e0c80d4320351f9198d7c29623488fe4b50a4f368e4c2829a022d180b0f8c1a2796f53e1d6f69685700e9fb7d68
@@ -18,7 +18,6 @@ module HashAttributeAssignment
18
18
  @hash = hash
19
19
  @klass = instance.class
20
20
  @instance = instance
21
- @hash_validations = klass.class_variable_get(:@@hash_validations)
22
21
  end
23
22
 
24
23
  def assign
@@ -30,9 +29,13 @@ module HashAttributeAssignment
30
29
 
31
30
  private
32
31
 
33
- attr_reader :klass, :instance, :hash_validations
32
+ attr_reader :klass, :instance
34
33
  attr_accessor :hash
35
34
 
35
+ def hash_validations
36
+ klass.send(:hash_validations)
37
+ end
38
+
36
39
  def assign_asstributes
37
40
  hash.each do |key, value|
38
41
  instance.instance_variable_set("@#{key}".to_sym, value)
@@ -1,3 +1,3 @@
1
1
  module HashAttributeAssignment
2
- VERSION = '0.0.4'.freeze
2
+ VERSION = '0.0.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_attribute_assignment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Alexander
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-02 00:00:00.000000000 Z
11
+ date: 2016-06-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: coreyja@gmail.com