y( object, *objects )
private
Prints any supplied objects out in YAML.
Intended as a variation on +Kernel::p+.
S = Struct.new(:name, :state)
s = S['dave', 'TX']
y s
produces:
--- !ruby/struct:S
name: dave
state: TX
Show source
def y( object, *objects )
objects.unshift object
puts( if objects.length == 1
YAML::dump( *objects )
else
YAML::dump_stream( *objects )
end )
end