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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 788923b15e15ee32a9ef7b73d99a04cfbc2b6b263bb0277541714267b07ab511
4
- data.tar.gz: 9a13bab214667dbb9e616d33bfb147ef6c7d8abb0fb9249f6f432f34be6db077
3
+ metadata.gz: e6f852b958cf7ed8f6f05d3860d738de716c1c5a7456917b4705abf4ab78b546
4
+ data.tar.gz: ea80e22f5fec3c6d5958a544a348790a01491490dc0f75ac98d8d59b88955122
5
5
  SHA512:
6
- metadata.gz: b5e8c453a6fcb2d6803f3fd1b7bd41386e9be8e53b74d3dba54892366ede77b279addb98a44030a6ac6b85f3c3781306fd8b8062fe77a4ac8619b8da8ce943f9
7
- data.tar.gz: 77665df94b421278636db62c478a6b2c2716e42f3661799d1bbebea13f20ca4dcc9753a246fbf47a48866791adf06389173fc2006e01fb69a9b87293b86e5ea6
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.99.0'
4
+ VERSION = '0.100.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_ruby_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.99.0
4
+ version: 0.100.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company