similarity_tree 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/similarity_tree/node.rb +3 -3
- data/lib/similarity_tree/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWUwYTdjOTM1MTIwOWJhODA4YWVhYjM0OTBjMTE5OTIzZmZiOWVhMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDdjZjU3ZDBlNGUwYTliZGM4MGRkZDdhYWYyNWNlYWI0YWRiMTQ5MA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzU3YTZkNDNjY2Q4NmZhYzEyN2NhZWUzZjI1ODViOWY5ZDM2MTE4MjQ3ODI4
|
10
|
+
NDg5NWU0OGNjYmVlMjQ5ZTQ2M2U3ZWYwNWY4ODU1M2JhY2NiYzllMTI3NWZi
|
11
|
+
NDhmN2I4MGU0OGU5NzVkYTc2N2M5ZGUwN2RhM2MwMDJiMTU2ZmI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Mjk5MzBiOTgwOTI2NDIxZjJjMTVhYmIyODljMDhiNWRjZmEzOGE1ODYwM2Ri
|
14
|
+
ZDFhYjE0MjcwZDY4MWY4MjZmYTBjZGViMDJjZDIzNjRiNWRhNDZlZWE2MTA3
|
15
|
+
ZmFlODZjNTkzMWJiOGU1MDI2MDU4YjVlN2JhZmZhNTJmNTVhNTQ=
|
data/lib/similarity_tree/node.rb
CHANGED
@@ -29,9 +29,9 @@ module SimilarityTree
|
|
29
29
|
result[:children] = children.map {|c| c.to_h} unless children.nil? || children.empty?
|
30
30
|
result[:diff_score] = diff_score unless diff_score.nil?
|
31
31
|
|
32
|
-
# if the content node has an as_json function,
|
33
|
-
if content.respond_to?(:as_json) && content.is_a?(Hash)
|
34
|
-
result = content.as_json.merge(result)
|
32
|
+
# if the content node has an as_json function, insert these attributes
|
33
|
+
if content.respond_to?(:as_json) && content.as_json.is_a?(Hash)
|
34
|
+
result[:content] = content.as_json.merge(result)
|
35
35
|
end
|
36
36
|
result
|
37
37
|
end
|