hashmake 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.rdoc +5 -1
- data/lib/hashmake/hash_makeable.rb +3 -3
- data/lib/hashmake/version.rb +1 -1
- metadata +4 -4
data/ChangeLog.rdoc
CHANGED
@@ -31,4 +31,8 @@ Validate args in validate_arg (which could be called independently from hash_mak
|
|
31
31
|
=== 0.1.6 / 2013-03-21
|
32
32
|
|
33
33
|
Add Hashmake::hash_makeable? for testing if a class includes Hashmake::HashMakeable.
|
34
|
-
Add #find_arg_specs and #make_hash methods to HashMakeable.
|
34
|
+
Add #find_arg_specs and #make_hash methods to HashMakeable.
|
35
|
+
|
36
|
+
=== 0.1.7 / 2013-06-21
|
37
|
+
|
38
|
+
In HashMakeable.make_hash, only make objects into hashes if the object class matches the arg spec type (and, still, if it is hash makeable).
|
@@ -172,7 +172,7 @@ module HashMakeable
|
|
172
172
|
ary = val
|
173
173
|
val = []
|
174
174
|
ary.each do |item|
|
175
|
-
if Hashmake::hash_makeable? item.class
|
175
|
+
if Hashmake::hash_makeable?(item.class) and item.class == arg_spec.type
|
176
176
|
val << item.make_hash
|
177
177
|
else
|
178
178
|
val << item
|
@@ -182,13 +182,13 @@ module HashMakeable
|
|
182
182
|
hsh = val
|
183
183
|
val = {}
|
184
184
|
hsh.each do |hsh_key,item|
|
185
|
-
if Hashmake::hash_makeable? item.class
|
185
|
+
if Hashmake::hash_makeable? item.class and item.class == arg_spec.type
|
186
186
|
val[hsh_key] = item.make_hash
|
187
187
|
else
|
188
188
|
val[hsh_key] = item
|
189
189
|
end
|
190
190
|
end
|
191
|
-
elsif Hashmake::hash_makeable?(val.class)
|
191
|
+
elsif Hashmake::hash_makeable?(val.class) and item.class == arg_spec.type
|
192
192
|
val = val.make_hash
|
193
193
|
end
|
194
194
|
|
data/lib/hashmake/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashmake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -133,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
segments:
|
135
135
|
- 0
|
136
|
-
hash:
|
136
|
+
hash: 4508738555952992171
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash:
|
145
|
+
hash: 4508738555952992171
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
148
|
rubygems_version: 1.8.23
|