objenealogist 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/objenealogist/version.rb +1 -1
- data/lib/objenealogist.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d4715a631350d4382c5a8aac1ef9c69d98b24f177f783ba5c4c378a26a1eae8b
|
|
4
|
+
data.tar.gz: de1f0496604ba3206a16d11d6cdc173ac61f06f54bb284f763d61b783499c6d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea5dacbcbaec72fb367ca3a2520060750587b74621ba963423cd25bbea207972a58ef24719987449e4d4b06e518fa046036f7109cd9f1d337f15fee5cbda808c
|
|
7
|
+
data.tar.gz: 2bcde0ad972a5e2466b1ee0012344a3cd711cf7ff043fd211acdb9cc307a38b376b34c41e03a465013ac1784e5ef85093a141f85d0ce62adaf3b0c396c2f2455
|
data/lib/objenealogist.rb
CHANGED
|
@@ -29,7 +29,7 @@ class Objenealogist # rubocop:disable Style/Documentation
|
|
|
29
29
|
|
|
30
30
|
class << self
|
|
31
31
|
def to_tree(clazz = self, show_methods: true, show_locations: true)
|
|
32
|
-
|
|
32
|
+
clazz = clazz.class if !clazz.respond_to?(:allocate) && clazz.respond_to?(:class)
|
|
33
33
|
Objenealogist::String.new(process_one(clazz, show_methods:, show_locations:).join("\n"))
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -140,3 +140,9 @@ class Class # rubocop:disable Style/Documentation
|
|
|
140
140
|
Objenealogist.to_tree(self, show_methods:, show_locations:)
|
|
141
141
|
end
|
|
142
142
|
end
|
|
143
|
+
|
|
144
|
+
class Object # rubocop:disable Style/Documentation
|
|
145
|
+
def to_tree(show_methods: true, show_locations: true)
|
|
146
|
+
Objenealogist.to_tree(self, show_methods:, show_locations:)
|
|
147
|
+
end
|
|
148
|
+
end
|