method

y

v1_9_1_378 - Show latest stable - Class: Kernel
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