method

y

v1_8_7_72 - 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