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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDlkMjkwMjJjNmFmN2I1YzBhMmUxOWUyYTU2NmMzYTM5OGQxOGE0Mg==
4
+ Zjc4NTA3NmM2YjU0OWY4NjcxMjA0OGE2MDA5YWY1NzNlMjc3ZTQzZg==
5
5
  data.tar.gz: !binary |-
6
- ZGQ1ZTAxZjExYzkwOTA4MjYzZGQ2YTU5MjNmMTgxYmY3NTQ3MmQ1ZQ==
6
+ Y2FiNjMxYTZjZDhhZTg1ZDlmYzgxMzJmNDI2OWQzYTc3OTUzYjY3OA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YzhjMDg1MTQ1NWRjNmI2YWY5Y2U0YjQxOGI3ZjE5OGNiNTgwMjkxY2UxODdh
10
- YWEwZDIwYzJmNWQxNTdhY2U5NzMyZmZhN2IzNTQ1MWMwMjZhNWYwMWVlODg1
11
- ZjBmZjJmZDVmYjJlNTBiMDFjYzFlNTU3NTJmOTUxMTQ3MTZjMWI=
9
+ MDIxYWZlYzNkZGJiYjRiMGI5Yzg2ZGQ5MTMzZmIxYzhjNTY4YjM2NGY1Zjlh
10
+ ZWViZjQwY2MxNjA5MWE2ZWUzYTIzYTc4MDNmODBhZjY2MDA0ZmQzZjQ1NzZl
11
+ MDk0NDIzN2UxMzU4ZmQwNDcwZGE2NDAzYjJjZmMwMjg3NmUyYTI=
12
12
  data.tar.gz: !binary |-
13
- MGRmMzE2NjdjYWNlMjNmY2VmYzc3MTJkNDJmN2NmZmZmNTAwNjQ1MThkZDZl
14
- MzE0MWM0OTM1YWRhMzNiMzI5OWQ1YjU1YTQxYjQ0OWY2Zjk5Y2ZmNjE0Y2Fi
15
- OGYwZWU2M2UzNzZlOWMwZDI5NTk2NjQwNDE3ZGFjYWViYzUyOWE=
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
@@ -1,6 +1,6 @@
1
1
  module ZTK
2
2
 
3
3
  # ZTK Version String
4
- VERSION = "1.7.0"
4
+ VERSION = "1.7.1"
5
5
 
6
6
  end
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.0
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-20 00:00:00.000000000 Z
11
+ date: 2013-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport