Class: Struct
Instance Method Summary collapse
Instance Method Details
#report_print(rp) ⇒ Object
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/report_print/core_extensions.rb', line 185 def report_print(rp) name = self.class.short_class_name rp.inline(" ") do rp.inline("") do rp.write(name, color: :bright_yellow) rp.write("(") end rp.write_object_id(self) end rp.multiline(after: ")", separator: ",") do self.to_h.each do |name, value| rp.inline(": ") do rp.write(name, color: :bright_cyan) rp.rp(value) end end end end |