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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bf00f425eca6902d2ab65a19c0b125f6a3a7462534f7aca0451097d6598f71e
4
- data.tar.gz: 6c70cd4562686b12755f94bc0c4d40f702a6ee787eecc3b73c051a8b4a653bfd
3
+ metadata.gz: d4715a631350d4382c5a8aac1ef9c69d98b24f177f783ba5c4c378a26a1eae8b
4
+ data.tar.gz: de1f0496604ba3206a16d11d6cdc173ac61f06f54bb284f763d61b783499c6d3
5
5
  SHA512:
6
- metadata.gz: 200cb4292920be6f24f1d15cb18b6e4eeab114534e9654968fc22c5892aefc5ba2704ff64534897928850f24d980be2615e710860130c0f4001b586887801852
7
- data.tar.gz: f65b8678119db27c0b9747ac2b9a2df749da48e3701516db6a9ec5cafd6bca1633ab2789199198491d45912f3e3f5e9d6c41c2080a573dedfbece00ac63e1220
6
+ metadata.gz: ea5dacbcbaec72fb367ca3a2520060750587b74621ba963423cd25bbea207972a58ef24719987449e4d4b06e518fa046036f7109cd9f1d337f15fee5cbda808c
7
+ data.tar.gz: 2bcde0ad972a5e2466b1ee0012344a3cd711cf7ff043fd211acdb9cc307a38b376b34c41e03a465013ac1784e5ef85093a141f85d0ce62adaf3b0c396c2f2455
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Objenealogist
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
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
- # ruby -r./lib/objenealogist -r./test/my_class -e "puts Objenealogist.to_tree(MyClass)"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: objenealogist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koji NAKAMURA