Class: Tap::Tasks::Dump::Inspect

Inherits:
Tap::Tasks::Dump show all
Defined in:
lib/tap/tasks/dump/inspect.rb

Overview

:startdoc::task inspect and dump an object

Dumps objects to a file or IO using object.inspect. An alternate method can be specified for inspection using the inspect_method config.

% tap load/yaml "{key: value}" -: inspect
{"key"=>"value"}

Instance Method Summary collapse

Instance Method Details

#dump(obj, io) ⇒ Object

Dumps the object to io using obj.inspect



21
22
23
# File 'lib/tap/tasks/dump/inspect.rb', line 21

def dump(obj, io)
  io.puts obj.send(inspect_method)
end