ztk 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/ztk/dsl/core/attributes.rb +6 -3
- data/lib/ztk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Zjc4NTA3NmM2YjU0OWY4NjcxMjA0OGE2MDA5YWY1NzNlMjc3ZTQzZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2FiNjMxYTZjZDhhZTg1ZDlmYzgxMzJmNDI2OWQzYTc3OTUzYjY3OA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDIxYWZlYzNkZGJiYjRiMGI5Yzg2ZGQ5MTMzZmIxYzhjNTY4YjM2NGY1Zjlh
|
10
|
+
ZWViZjQwY2MxNjA5MWE2ZWUzYTIzYTc4MDNmODBhZjY2MDA0ZmQzZjQ1NzZl
|
11
|
+
MDk0NDIzN2UxMzU4ZmQwNDcwZGE2NDAzYjJjZmMwMjg3NmUyYTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTliNTEwY2UzOGNhZDc1NWE3MzNlZGQ1NGY5MmUzYTQ5MTY2ZWJjMGRlNTI4
|
14
|
+
YWZlY2YxMDg4OTA3MzNlMTg5ZjM2MTg5MDljYmJhZTkwN2NjNjg3NjM2N2Nh
|
15
|
+
N2EyNDkyMTU0NjlmOWRhM2RjODZmZTRhNGNiYTRkOTIwMjA5ZGQ=
|
@@ -23,10 +23,13 @@ module ZTK::DSL::Core
|
|
23
23
|
attribute_options[key] = options
|
24
24
|
|
25
25
|
send(:define_method, key) do |*args|
|
26
|
+
if (attributes[key].nil? && !self.class.attribute_options[key][:default].nil?)
|
27
|
+
default_value = (self.class.attribute_options[key][:default].dup rescue self.class.attribute_options[key][:default])
|
28
|
+
|
29
|
+
attributes[key] ||= default_value
|
30
|
+
end
|
31
|
+
|
26
32
|
if args.count == 0
|
27
|
-
if (self.class.attribute_options[key] && self.class.attribute_options[key][:default])
|
28
|
-
attributes[key] ||= (self.class.attribute_options[key][:default].dup rescue self.class.attribute_options[key][:default])
|
29
|
-
end
|
30
33
|
attributes[key]
|
31
34
|
else
|
32
35
|
send("#{key}=", *args)
|
data/lib/ztk/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ztk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Patten
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|