Class: Data
- Inherits:
-
Object
show all
- Defined in:
- lib/report_print/core_extensions.rb
Instance Method Summary
collapse
Instance Method Details
#report_print(rp) ⇒ Object
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
# File 'lib/report_print/core_extensions.rb', line 164
def report_print(rp)
name = self.class.short_class_name
rp.inline("") do
rp.write(name, color: :blue)
rp.write("[")
end
rp.multiline(after: "]", separator: ",") do
self.to_h.each do |name, value|
rp.inline(" ") do
rp.inline("") do
rp.write(name, color: :bright_cyan)
rp.write(":")
end
rp.rp(value)
end
end
end
end
|