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



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/report_print/core_extensions.rb', line 125

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