Module: Ducktrap::PrettyDump
Overview
Mixin for pretty dumpable objects
Instance Method Summary collapse
-
#pretty_dump(output = Formatter.new) ⇒ self
private
Perform pretty dump of ducktrap.
-
#pretty_inspect ⇒ String
private
Return pretty inspection.
Instance Method Details
#pretty_dump(output = Formatter.new) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Perform pretty dump of ducktrap
11 12 13 14 |
# File 'lib/ducktrap/pretty_dump.rb', line 11 def pretty_dump(output=Formatter.new) dump(output) self end |
#pretty_inspect ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return pretty inspection
22 23 24 25 26 27 28 |
# File 'lib/ducktrap/pretty_dump.rb', line 22 def pretty_inspect io = StringIO.new formatter = Formatter.new(io) pretty_dump(formatter) io.rewind io.read end |