Class: Hash

Inherits:
Object show all
Defined in:
lib/report_print/core_extensions.rb

Instance Method Summary collapse

Instance Method Details

#report_print(rp) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/report_print/core_extensions.rb', line 56

def report_print(rp)
  rp.write("{")
  rp.multiline(after: "}", separator: ",") do
    each do |key, value|
      rp.inline(" ") do
        case key
        in Symbol
          rp.write(key, ":", color: :bright_cyan)
        else
          rp.rp(key)
          rp.write("=>")
        end

        rp.rp(value)
      end
    end
  end
end