ztk 1.18.4 → 1.18.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: 16e9d5ac16fff020f0701db0e4b9d2840e4d26f7
4
- data.tar.gz: 045850663f06dd30aa10b2ed37a0bf7fe66d533b
3
+ metadata.gz: 15870a2fb96bcf1aa8f0e0e5cdc5c2707fdc9b5e
4
+ data.tar.gz: 33c3a98ce4e7a4d939a359ffe3bbb8ee693d2bb4
5
5
  SHA512:
6
- metadata.gz: b721407e733412e24a2bc8d89b4201f36c1cb741812a7224d6da0ac950c2db157e5e9fc66ef4025c1000708157703ae3537c2e8f8a2e39ad32b907a82e968c39
7
- data.tar.gz: 6fc9ed8eb75c3aa67e7fa44c98f693eae3c690ada1d8985ccba162bcb5dbc8095f5a544b1ac4601e6a9dc2bee43ecf338a8c34a6fda609e918f4efea5ba53cca
6
+ metadata.gz: f2e7a2a41ac1fec4c9b1481893d3d78dcf1719c6716da9a3062ae65e3480b40d1f236c1d2c73e7a6b152a91c87222dc99126915c30807cc04df077f50c1f2abc
7
+ data.tar.gz: bb0a67cf931f0314042d12e68cd28996cf843b4d76e50edeef3882c9928d7167dffb344151fedd9f8809d98789821459a0091d745fbf32a2750f9501ed02c3f3
@@ -20,11 +20,13 @@ module ZTK::DSL::Core
20
20
  module ClassMethods
21
21
 
22
22
  def attribute(key, options={})
23
- attribute_options[key] = options
23
+ klass = self.to_s.split('::').last.downcase
24
+ option_key = "#{klass}_#{key}"
25
+ attribute_options[option_key] = options
24
26
 
25
27
  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
+ if (attributes[key].nil? && !self.class.attribute_options[option_key][:default].nil?)
29
+ default_value = (self.class.attribute_options[option_key][:default].dup rescue self.class.attribute_options[option_key][:default])
28
30
 
29
31
  attributes[key] ||= default_value
30
32
  end
data/lib/ztk/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module ZTK
2
2
 
3
3
  # ZTK Version String
4
- VERSION = "1.18.4"
4
+ VERSION = "1.18.5"
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.18.4
4
+ version: 1.18.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Patten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-05 00:00:00.000000000 Z
11
+ date: 2014-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport