eac_ruby_utils 0.99.0 → 0.100.0
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/eac_ruby_utils/patches/object/debug.rb +17 -2
- data/lib/eac_ruby_utils/version.rb +1 -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: e6f852b958cf7ed8f6f05d3860d738de716c1c5a7456917b4705abf4ab78b546
|
|
4
|
+
data.tar.gz: ea80e22f5fec3c6d5958a544a348790a01491490dc0f75ac98d8d59b88955122
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b9be95919c93a7b3800d726bb52055c9ecfe92b422601af67cc7ad50bbd0a6602d0d92d120759ad408661201040512545286fc376832031f594e46ea1d7d121
|
|
7
|
+
data.tar.gz: 50674addc08d99c21ffcd2160a8beeb0418f49bd1bd6b2a815544179495b8fce3b4e33fb98074ab530a8def5052db2022048d758943afff3ade8855a3d6bc512
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
class Object
|
|
4
|
-
def pretty_debug
|
|
4
|
+
def pretty_debug(options = {})
|
|
5
|
+
print_debug_title(options)
|
|
6
|
+
|
|
5
7
|
STDERR.write(pretty_inspect)
|
|
6
8
|
|
|
7
9
|
self
|
|
8
10
|
end
|
|
9
11
|
|
|
10
|
-
def print_debug
|
|
12
|
+
def print_debug(options = {})
|
|
13
|
+
print_debug_title(options)
|
|
11
14
|
STDERR.write(to_debug + "\n")
|
|
12
15
|
|
|
13
16
|
self
|
|
14
17
|
end
|
|
15
18
|
|
|
19
|
+
def print_debug_title(title)
|
|
20
|
+
if title.is_a?(::Hash)
|
|
21
|
+
return unless title[:title]
|
|
22
|
+
|
|
23
|
+
title = title[:title]
|
|
24
|
+
end
|
|
25
|
+
char = '='
|
|
26
|
+
STDERR.write(char * (4 + title.length) + "\n")
|
|
27
|
+
STDERR.write("#{char} #{title} #{char}\n")
|
|
28
|
+
STDERR.write(char * (4 + title.length) + "\n")
|
|
29
|
+
end
|
|
30
|
+
|
|
16
31
|
def to_debug
|
|
17
32
|
"|#{::Object.instance_method(:to_s).bind(self).call}|#{self}|"
|
|
18
33
|
end
|