class_kit 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/class_kit/attribute_helper.rb +5 -0
- data/lib/class_kit/class_methods.rb +1 -3
- data/lib/class_kit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b04e63defcbf713db13b397030088c75df322988
|
4
|
+
data.tar.gz: 7c6ff0680abd2ac61303817e3f1e4cb4b6e2faac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2865ee3791b6aa2aeb21634dee06d664c8e723903592ab01f223a4778eb4ebd58de605c61182548d2eed07d7a886356cbabaa221881c175ab7a17d7ebbe7dcff
|
7
|
+
data.tar.gz: 22da5d28f81a7ae473c83e4f8b942c7fc92a7c2e40a37cadd8d4a1462f17ad4c25219a9c9a7a7253d3ae74d35bd26c4c150bfd3e3d304b7a6bc02aaddb35002d
|
@@ -10,8 +10,6 @@ module ClassKit
|
|
10
10
|
|
11
11
|
attributes[name] = { name: name, type: type, collection_type: collection_type, allow_nil: allow_nil,
|
12
12
|
default: default, auto_init: auto_init, meta: meta }
|
13
|
-
puts self
|
14
|
-
puts self.ancestors
|
15
13
|
|
16
14
|
class_eval do
|
17
15
|
define_method name do
|
@@ -34,7 +32,7 @@ module ClassKit
|
|
34
32
|
class_eval do
|
35
33
|
define_method "#{name}=" do |value|
|
36
34
|
#get the attribute meta data
|
37
|
-
cka = self.class
|
35
|
+
cka = ClassKit::AttributeHelper.instance.get_attribute(klass: self.class, name: name)
|
38
36
|
|
39
37
|
#verify if the attribute is allowed to be set to nil
|
40
38
|
if value.nil? && cka[:allow_nil] == false
|
data/lib/class_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: class_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaughanbrittonsage
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|