enum_attributes_validation 0.1.5 → 0.1.6

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: eed35f8975e88da59799c9a0b5a7d19b02c8ca7d
4
- data.tar.gz: 85edbfc87a7659119da0026eedb89b0eca189402
3
+ metadata.gz: 2fd6e05a56f58024f5393bc168563c041e1954b5
4
+ data.tar.gz: 22209197eed9c900e6230fbd3f3d58235093a8f5
5
5
  SHA512:
6
- metadata.gz: e3fc1d9ad49012fa445ce4198db2c19481089a281a11f17b56d26a093f196bb64df11e3566730f812ace372e2fe56fc8911f95ff0473af529c925d32c6428c9b
7
- data.tar.gz: e8e9f75fc20545aef52d7fb819c3351a38983d79c534894cc4b08660b8fbba4c8d0e14eb1a31f74eeccd382bada953aab92e67d5ad73108ec8376210f10ddb51
6
+ metadata.gz: 2c16cb855fab91a5c1d0cf188f00e26c67b76bbdc4260459bc7eaf494930be6cb2982b7b155c36bab78632b1d70e9e98db34404cc77b3759f682155f484e551a
7
+ data.tar.gz: 07776dece012a1663646221c2f3e844b1205c14648fc89f17dcfb62161f0af6b20bd96e068fa28ba7abb97263360d170b0c8908f0adbd4f82f838bfce48e69d8
@@ -30,8 +30,8 @@ module EnumAttributesValidation
30
30
 
31
31
  define_method (string_attribute+"=").to_sym do |argument|
32
32
  string_argument = argument.to_s
33
- self[string_attribute] = string_argument if self.send(string_attribute.pluralize).keys.include?(string_argument)
34
- self.enum_invalid_attributes[attribute] = string_argument unless self.send(string_attribute.pluralize).keys.include?(string_argument)
33
+ self[string_attribute] = string_argument if self.class.send(string_attribute.pluralize).keys.include?(string_argument)
34
+ self.enum_invalid_attributes[attribute] = string_argument unless self.class.send(string_attribute.pluralize).keys.include?(string_argument)
35
35
  end
36
36
  end
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module EnumAttributesValidation
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enum_attributes_validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cristi Stefan